select XX_id
from tiantiantian
where sum_date=20110420
and XX_status <30
and XX_type in (1009, 1008, 1003, 1011)
and XX_date >to_date(20110420, 'yyyymmdd')
and not exists(
select xx_id from dididi
where sum_date=20110420
and XX_status <30
and XX_type in (1009, 1008, 1003, 1011)
and XX_date >to_date(20110420, 'yyyymmdd'))
--B:
select XX_id
from dididi
where sum_date=20110420
and XX_status <30
and XX_type in (2001)
and XX_date >to_date(20110420, 'yyyymmdd')
and not exists(
select xx_id from tiantiantian
where sum_date=20110420
and XX_status <30
and XX_type in (2001)
and XX_date >to_date(20110420, 'yyyymmdd'))
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)