当前位置:Gxlcms > 数据库问题 > 查询数据库中某一列有没有重复数据项

查询数据库中某一列有没有重复数据项

时间:2021-07-01 10:21:17 帮助过:32人阅读

查询数据库中某一列有没有重复数据项:

select * from cd_stock where stock_bh in (select stock_bh from cd_stock group by stock_bh having count(stock_bh) >1 )

select * from cd_stock_item where id in (select id from cd_stock_item group by id having count(id) >1 )

查询数据库中某一列有没有重复数据项

标签:重复数   where   group by   复数   sele   重复   div   pos   gpo   

人气教程排行