首页 > 数据库技术 > 详细

mysql 查询——逻辑查询

时间:2019-07-24 09:24:01      阅读:110      评论:0      收藏:0      [点我收藏+]
 1 --去重查询 distinct
 2 select distinct gander from student;
 3 
 4 --逻辑查询
 5    and or not
 6    --查询18-28之间的数据
 7    select *from student age>18 and age<28;
 8    --查询age大于18的女性
 9    select *from student age>18 and name="lady";
10    --多条件查询
11    select * from student where age>10 and gender="man" and high>150;
12 
13    --查询不是age大于18的女性  not
14    select *from student not (age>18 and name="lady");

 

mysql 查询——逻辑查询

原文:https://www.cnblogs.com/jum-bolg/p/11235423.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!