虚位以待(AD)
虚位以待(AD)
首页 > 数据库 > MsSql数据库 > SQL表内查重

SQL表内查重
类别:MsSql数据库   作者:码皇   来源:<a href="http://blog.csdn.net/fm0517" target="_blank" rel="nofollow"   点击:

SQL表内查重,查询重复记录。

SQL表内查重,查询重复记录

select * from my_tab
where dup_col in(
select dup_col from my_tab
group by dup_col
having count(dup_col)>1
)
order by dup_col;

相关热词搜索: