
select school_id from ft_user where batchcode = '2013' group by school_id建议这个样子试试,比用distinct要好。
select t.* from 表 twhere exists(select * from 表 a where a.第二列 = t.第二列 group by a.第二列 having count(a.第二列) = 1)
欢迎分享,转载请注明来源:内存溢出

select school_id from ft_user where batchcode = '2013' group by school_id建议这个样子试试,比用distinct要好。
select t.* from 表 twhere exists(select * from 表 a where a.第二列 = t.第二列 group by a.第二列 having count(a.第二列) = 1)
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)