0
選擇頂部1列1在SQL Server之間select @var=column1 from table1
& select top 1 column1 from table1
差異從表1
我有與在SELECT語句中列的視圖問題2005
差異在這個模型中
select column0, fn(column0) as col from table2
是fn
回select @var=column1 from table1 where [email protected]
我這個
select
column0,
(select top 1 column1 from table1 where table1.id = table2.column0) as col
from table2
取代它,但結果不一樣以前
,並在
select top 1 column1 from table1 where table1.id = table2.column0
也沒有效果
我需要知道爲什麼使用順序我可以更換嗎
select top 1 column1 from table1 where table1.id = table2.column0
具有相同的結果
select @var=column1 from table1 where table1.column3 = @inputid