sql server - What does "SELECT X=[column] FROM [table] exactly does"? -


i wanted set variable in sql by

select @myvariable=mycolumn mytable ... 

but mistake wrote without @

select myvariable=mycolumn mytable ... 

it seems valid, there isn't error in syntax, although variable of course isn't set.

so such instruction do?

this sets myvariable alias mycolumnn. it's same as:

select  mycolumn myvariable    mytable   ... 

Comments

Popular posts from this blog

ios - Is 'init' forbidden as *part* of a variable name? -

angular - Angular2 Router: Cannot find primary outlet to load 'HomeComponent' -

javascript - Why Selenium can't find an element that is graphically visible -