- #1
- 6,368
- 8,698
Hi, I wonder if someone remembers their T-SQL. We have this statement:
Just curious: I remember using SET where SELECT appears. Is this SELECT used in order to
assign values to many variables simultaneously? Also, Is there a reason to use two separate
DECLARE statements , or could we just use a single one?
EDIT : I am also confused about the OBJECT_ID function. I tried it on my SQL Server and got an error message when entering the name of the database I was using, i.e., OBJECT_ID( 'Database Name') generated an error message.
Thanks.
Just curious: I remember using SET where SELECT appears. Is this SELECT used in order to
assign values to many variables simultaneously? Also, Is there a reason to use two separate
DECLARE statements , or could we just use a single one?
EDIT : I am also confused about the OBJECT_ID function. I tried it on my SQL Server and got an error message when entering the name of the database I was using, i.e., OBJECT_ID( 'Database Name') generated an error message.
Thanks.
Last edited: