Blogger Information
Blog 16
fans 0
comment 0
visits 14497
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
mysql查询where常用运算符
进击的小菜鸟
Original
1328 people have browsed it

列当作是变量,变量可以计算

where是表达式 值为真假

<小于

<= 小于等于

= 等于

in 在某集合内

!=或<> 不等于

>= 大于或等于

> 大于

between  在某范围内

NOT 或 !  逻辑非

OR 或 || 逻辑或

AND 或 && 逻辑与

select ceil(num/10)*10 from num  where num between 20,39


where 针对数据表  having针对结果集

V$3G88N}D6U4}KNNA4QPG9J.png

不能用count  用sum

select  name,avg(score) from student  group by name having sum(score<60)>=2 ;//这个地方不能用count  因为count记得是行数不管大小都会计一行  sum记的是结果的和  当score>60的时候返回的是0  


小笔记:phpMailer发邮件   改端口需要在mail.php 里面改配置的默认端口  不然没用

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!