《mysql必知必会》学习_第六章_20180730_欢
第六章《过滤数据》
P35
1. select prod_name,prod_price from products where prod_price=2.5;
2.select prod_name,prod_price from products where prod_price='2.5';
#两个语句得到的结果一样,因为指定的是数值。

P36
select prod_name,prod_price from products where prod_name='fuses'; #当指定的是文字时候,则要用引号(‘ ’)。

select prod_name,prod_price from products where prod_price <10; #检索prod_price小于或等于10(<=不是=<)的,读取prod_name,prod_price列。

select prod_name,prod_price from products where prod_price <10; #检索prod_price小于10的,读取prod_name,prod_price列。

P37 不匹配检查(不等于某个值)
1. select vend_id,prod_name from products where vend_id <>1003; #vend_id不等于1003#
2.1. select vend_id,prod_name from products where vend_id !=1003; #vend_id不等于1003# 1和2的表达的意思是一样的#

P38
select prod_name,prod_price from products where prod_price between 5 and 10; #检索prod_price在范围5到10之内的。注意:数值加上引号与否并不会影响结果#

select prod_name from products where prod_price is null ; #表示检索prod_price是空值的#返回没有结果,因为prod_price没有空值#

P39
select cust_id from customers where cust_email is null ;#检索cust_email是空值#

《mysql必知必会》学习_第六章_20180730_欢的更多相关文章
- 《mysql必知必会》学习_第五章_20180730_欢
使用的工具是wamp的Mysql. P29 select prod_name from products; #在表products中选列prod_name,顺寻不是纯粹的随机,但是没有说明排列顺序, ...
- 《mysql必知必会》学习_第七章_20180730_欢
第七章:数据过滤 P43 select prod_id,prod_price,prod_name from products where vend_id =1003 and prod_price &l ...
- 《mysql必知必会》学习_第18章_20180807_欢
第18章 全文本搜索 P121 #创建一个新表,对表的列进行定义,定义之后,MySQL自动维护该索引# create table productnotes ( note_id int NOT ...
- 《mysql必知必会》学习_第22章_20180809_欢
第22章:使用视图,视图是虚拟的表,以表形式呈现的是你查询的结果.并不是说在数据库里面真的存在这个表,但是是真的存在这些数据. select cust_name,cust_contact from c ...
- 《mysql必知必会》学习_第20章_20180809_欢
第20章:更新和删除数据 P140 update customers set_emails='elmer@fudd.com' where cust_id=10005; 更新多个列,用逗号隔开.注意被指 ...
- 《mysql必知必会》学习_第19章_20180809_欢
第19章 插入数据 P132 insert into customers VALUES(NULL,'Pep E.Lapew','100 Main Street',,Los Angeles','CA', ...
- 《mysql必知必会》学习_第17章_20180807_欢
第17章:组合查询 P114 select vend_id ,prod_id,prod_price from products where prod_price <=5 ; select ven ...
- 《mysql必知必会》学习_第16章_20180807_欢
第16章:创建高级联结. P106 select concat(RTrim(vend_name),'(',RTrim(vend_country),')') as vend_title from ven ...
- 《mysql必知必会》学习_第15章_20180806_欢
第15章:联结表 P98 外键:外键为某个表的一列A,同时这一列包含另一个表的主键值B(B属于A,等于或者小于的关系) P99 select vend_name,prod_name,prod_pric ...
随机推荐
- istio-jaeger-spring boot调用链配置
istio-jaeger-spring boot调用链配置 虽然,istio ingress controller已经生成了jaeger 记录所需要的信息,但是多个分布式之间没法清晰记录相互之间的依赖 ...
- Linux下动态库使用小结
转自:https://blog.csdn.net/jaylong35/article/details/6132087 1. 静态库和动态库的基本概念 静态库,是在可执行程序连接时就已经加 ...
- spring自动注解Autowired配置
1.spring注解:http://blog.csdn.net/xyh820/article/details/7303330/ 2.最简ssm配置:http://blog.csdn.net/qq_18 ...
- iOS8 UIAlertView键盘闪一下的问题
if (SYSTEM_VERSION >= 8.0) { UIAlertController *alertCtrl = [UIAlertController alertControllerWit ...
- c#while循环注意continue的地方
在使用while 时发现一个很大的问题,continue最好慎用! private void do() { int i = 0; while (true) { //continue;//绝对的死循环 ...
- RPDU
RPDU(Remote Power Distribution Unit) 又称网络电源控制系统.远程电源管理系统.智能PDU.智能电源分配系统,是由傲视恒安科技(北京)有限公司自主研发生产并在全国范围 ...
- PHP 5.6 开启CURL HTTPS 类型
前几日要写微信支付接口,微信支付接口CURL地址是HTTPS.本机测试的是OK的,但是服务器缺提示错误--“ Protocol https not supported or disabled in l ...
- Python3实战系列之四(获取印度售后数据项目)
问题:续接上一篇.说干咱就干呀,勤勤恳恳写程序呀! 目标:此篇开始进入正题了.为实现我们整个项目功能而开始实现各个子模块功能.首先实现第一篇列出的分步功能模块的第一步: 1.python访问ftp,下 ...
- 【搜索】Dungeon Master
Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is co ...
- 非接触IC卡中typeA卡和typeB卡的区别--总结,二者的调制方式和编码方式不同
非接触IC卡中typeA卡和typeB卡的区别--总结,二者的调制方式和编码方式不同 1.非接触式IC卡的国际规范ISO/IEC14443的由来? 在非接触式IC卡的发展过程中,这些问题逐渐被解决并形 ...