查询一个表中某字段重复记录

    技术2022-05-19  22

    (oracle)数据中某一字段下含有重复值得记录,就是检查出有重复值的项。

    例如查询企业电话表中有相同电话的信息:

    select 电话,count(*) from 企业电话表  group by 电话 having count(*)>1;

    eg:select telephone from t_customer_tel group by telephone having count(*)>1;(查询这一列所有的重复的值)

    查询所有重复值的所有列:

    select * from t_customer_tel where telephone in (select telephone from t_customer_tel group by telephone having count(*)>1);


    最新回复(0)