1)Select ….
From DB1 inner join DB2 on a.keyword=b.keyword
Where controls;
Quit;
2)Select ……
From DB1 where controls and keyword in ( select keyword from B );
a) 1) and 2) are not same when select clause include columns in DB2
b) if select keyword from B return large dataset 2) will be slower then 1)
c)you can use select distinct keyword from B if there are duplicates return from this query
回複:我也跟風問個關於SQL的問題,請高人賜教。
所有跟帖:
• 回複:回複:我也跟風問個關於SQL的問題,請高人賜教。 -veggiedoggie- ♀ (246 bytes) () 11/10/2009 postreply 11:14:50
• 回複:回複:回複:我也跟風問個關於SQL的問題,請高人賜教。 -nice2u- ♂ (278 bytes) () 11/10/2009 postreply 11:26:14