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

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -