(数据库执行效率高)
select * from dbo.MediafileInfo as a where
(VideoDownUrl IN (SELECT VideoDownUrl FROM MediafileInfo AS B WHERE A.ProgramID <>B.ProgramID))
(数据库执行效率低)
SELECT *
FROM MediafileInfo AS A
WHERE (SELECT COUNT(*) FROM MediafileInfo WHERE VideoDownUrl=A.VideoDownUrl)>1
select distinct biao.idfrom biao
left outer join (select col1, col2
from biao
group by col1, col2
having count(*) >1) tmp
on biao.col1 = tmp.col1
and biao.col2 = tmp.col2
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)