Select statement always execute/select columns in order?
Posted
by Aseem Gautam
on Stack Overflow
See other posts from Stack Overflow
or by Aseem Gautam
Published on 2010-05-20T09:27:07Z
Indexed on
2010/05/20
9:40 UTC
Read the original article
Hit count: 359
sql-server
|tsql
Does all the columns in select statement gets selected one after another as listed?
Declare @X, @Y
SELECT
@X = ColumnA*.25 + ColumnB*2.5,
@Y = ColumnA*.5 + ColumnC*1.33,
TOTAL = @X + @Y
FROM SomeTable
Is the above query safe to use? Will total always be selected after @X and @Y are calculated?
© Stack Overflow or respective owner