語法:select * from 表名 where (欄位名) in (select 欄位,名 from 表名 group by 欄位名 having count(*) > 1); 如一下goods表: : 執行sql語句:select * from goods where inventory in ...
語法:select * from 表名 where (欄位名) in (select 欄位,名 from 表名 group by 欄位名 having count(*) > 1);
如一下goods表:
:
執行sql語句:select * from goods where inventory in (select inventory from goods group by inventory having count(*) > 1);