Answer by A-K for SET vs. SELECT - What's the difference?
Common question, canned answer:http://sqlblog.com/blogs/alexander_kuznetsov/archive/2009/01/25/defensive-database-programming-set-vs-select.aspx
View ArticleAnswer by Mitch Wheat for SET vs. SELECT - What's the difference?
SQL Server: one situation where you have to use SELECT is when assigning @@ERROR and @@ROWCOUNT as these have to be set in the same statement (otherwise they get reset):SELECT @error = @@ERROR,...
View ArticleAnswer by TheVillageIdiot for SET vs. SELECT - What's the difference?
Set is ANSI standard for assigning values to variables.Select can be used when assigning values to multiple vairables.For more details please read this detailed post by Narayana Vyas
View ArticleAnswer by Arnkrishn for SET vs. SELECT - What's the difference?
set and select both assign values to variables. Using select you can assign values to more than one variablesome thing like select @var1=1,@var2=2where as using set you have to use separate set...
View ArticleAnswer by TStamper for SET vs. SELECT - What's the difference?
SET is the ANSI standard way of assigning values to variables, and SELECT is not. But you can use SELECT to assign values to more than one variable at a time. SET allows you to assign data to only one...
View ArticleSET vs. SELECT - What's the difference?
Can someone please identify the functional/performance differences, if any, between SET and SELECT in T-SQL? Under what conditions should I choose one over the other?UPDATE:Thanks to all who responded....
View Article