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? -

file - Python: AttributeError: 'str' object has no attribute 'readlines' -

c# - Get the Class name in a class with atribute inside a attribute method -