2011-04-13 57 views
0

HI需要查詢的輸出列

其實我需要一個像查詢:

select x from a as col1 , 
select y from b as col2 , 
select Z from c as col3 

和輸出應該像

col1 | col2 | col3 


x | y | z 
+2

你在表格a,b和c中有共同的列嗎?以便您可以按照您提供的格式獲取輸出。 – 2011-04-13 12:23:13

+0

如果你這樣做,你可以使用加入 – PedroC88 2011-04-13 12:24:46

回答

1

如果您確信表A,B和c沒有超過一行,你可以做到這一點。

select 
(select x from a) as col1 , 
(select y from b) as col2 , 
(select Z from c) as col3 
+0

你有it.thanks :) – 2011-04-13 12:31:39