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

mysql中查询语句做为条件

时间:2016-06-02 11:29:26      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:

select distinct t.demandNo
from t_aaa t, t_bbb o
where 1=1 and t.Id=o.Id
 and t.demandNo not in
(select t.demandNo from t_aaa t, t_bbbo where 1=1 and t.Id=o.Id and o.status=3 order by t.demandNo DESC)

mysql中查询语句做为条件

标签:

原文地址:http://www.cnblogs.com/ityzw/p/5552200.html

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