码迷,mamicode.com
首页 > 数据库 > 详细

sql查询

时间:2015-03-30 13:07:45      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:

SELECT * from aa WHERE aa not in(2,3)
and aa not in(SELECT aa from aa where bb =1 and cc is null);

(SELECT * from aa where bb not in (1,2,3)) UNION all (SELECT * from aa where bb =1 and cc is not null )

sql查询

标签:

原文地址:http://www.cnblogs.com/w8104254/p/4377664.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!