1
我有以下查詢Oracle路口:有或無明顯
select id from t1
intersect
select id from t2
intersect
select id from t3
ID可能是一些表的非唯一的,所以我需要使用不同的。
一般什麼是更好的:
select distinct id from (
select id from t1
intersect
select id from t2
intersect
select id from t3)
或
select distinct id from t1
intersect
select id from t2 -- here id is unique
intersect
select distinct id from t3
「更好」 - 用什麼術語?性能?只需運行它們並找出或使用解釋計劃。 – Ollie 2012-08-08 09:00:54
@奧莉,是的表現 – 2012-08-08 09:03:25