【发布时间】:2009-11-26 08:04:50
【问题描述】:
Table1 t10 (id)
id
---
1
2
表 t11(a1,a2,a3)
a1 a2 a3
----------
1 10 a
1 10 b
1 11 b
1 12 c
2 20 d
2 21 e
select * from t10 a,t11 b where a.id = b.a1 如何显示
id a1 a2 a3
--------------
1 1 10 a
1 1 10 b //(not display this row)
1 1 11 b //(not display this row)
1 1 12 c //(not display this row)
2 2 20 d
2 2 21 e //(not display this row)
只需获取 t11 的随机行
maybe display this
id a1 a2
----------
1 1 11 b
1 1 10 a //(not display this row)
1 1 10 b //(not display this row)
1 1 12 c //(not display this row)
2 2 20
2 2 21 //(not display this row)
【问题讨论】:
-
那些是一些糟糕的表和列名......
-
是的,很抱歉,它是甲骨文