Is there a way to set all variables with one set statment, like you can with a declare statement?
For example:
Declare @Test VARCHAR(10),
@Test2 VARCHAR(10),
@Test3 INT
SET @Test = 'test'
SET @Test2 = 'Test2'
SET @Test3 = 1
Where I want to do something like the below, but the below does not work:
Set @Test = 'test',
@Test2 = 'Test2',
@Test3 = 3
Instead of
SET, useSELECT.Here’s a great article on SET vs SELECT in SQL Server / TSQL.