T-SQL: SET vs SELECT when assigning variables
Edit
I am by no mean a T-SQL expert, but currently need to troubleshoot a store procedure (SP). One thing bother me is that the SP writer use SELECT to assign value to varible, I was told SET should be used, but after some googling I found that SET is new since 1999 and before that everyone use SELECT to assign variable. As I always say SQL is very ugly and there are too many way to complete a task. Check out what is the different between using SET and SELECT from this link T-SQL: SET vs SELECT when assigning variables
T-SQL: SET vs SELECT when assigning variables
Reviewed by DF
on
7:20:00 PM
Rating: