SQL語句顯示問題(100分)

  • 主题发起人 主题发起人 yil9999
  • 开始时间 开始时间
Y

yil9999

Unregistered / Unconfirmed
GUEST, unregistred user!
字段a, b
a b
1 00
1 01
2 00
2 00
3 02
3 01
怎样用SQL語句查出以下結果呢?
1 00
1 01
3 02
3 01
相同的a, 不同的b。
 
呵呵:)
1、OnOwnerDraw;
2、OnGetRecord
 
Johnny_du, 能不能说更詳細一点呢?謝謝!
 
select a ,b
from table1
group by a,b
having count(*) = 1
 
select a.a,a.b from (select a,b,count(*) count from table group by a,b) a where a.count<2
 
已明白,非常謝謝!
 
后退
顶部