查询数据库中某一列有没有重复数据项:
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 )
Posted 猎人行动
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了查询数据库中某一列有没有重复数据项相关的知识,希望对你有一定的参考价值。
查询数据库中某一列有没有重复数据项:
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 )
以上是关于查询数据库中某一列有没有重复数据项的主要内容,如果未能解决你的问题,请参考以下文章