请问怎样用语句查询出一个中的两条重复记录?急....
表R107 有列 A 、 B
a 2
b 3
a 2
请问怎样查询能得出 RESULT: a 2
a 2
------解决方案--------------------lz举个例子
SQL> select * from test00;
USERNAME PAY
-------------------- ----------
mikle_22 800
mikle 500
mikle 500
SQL> select * from test00 A where username in (select username from test00 A group by username having count(*)> 1)
2 /
USERNAME PAY
-------------------- ----------
mikle 500
mikle 500
换成你对应的字段即可