select * from p_user
--这样有1000条记录.
select * from p_user
where ( convert(char(6),u_id) in(select convert(char(6),yd_cdru) a from cdru))
--这样有100条记录.
select * from p_user
where ( convert(char(6),u_id) not in(select convert(char(6),yd_cdru) a from cdru))
--这样没有记录了.这里应是1000-100=900条记录.
--这样有1000条记录.
select * from p_user
where ( convert(char(6),u_id) in(select convert(char(6),yd_cdru) a from cdru))
--这样有100条记录.
select * from p_user
where ( convert(char(6),u_id) not in(select convert(char(6),yd_cdru) a from cdru))
--这样没有记录了.这里应是1000-100=900条记录.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货