Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET vs SELECT
Message
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
SET vs SELECT
Environment versions
SQL Server:
SQL Server 2014
Application:
Web
Miscellaneous
Thread ID:
01611728
Message ID:
01611728
Views:
60
Another newbie question.

I can set a value to a variable in a stored procedure using SET or SELECT. E.g.
set @MyVar = 0
select @MyVar = 0
Which approach is a better practice and why?

TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform