I'm converting SQL from Teradata to SQL Server
in Teradata, they have the format
SELECT col1, col2
FROM table1
INTO @variable1, @variable2
In SQL Server, I found
SET @variable1 = (
SELECT col1
FROM table1
);
That only allows a single column/variable per statement. How to assign 2 or more variables using a single SELECT statement?
SELECT @variable1 = col1, @variable2 = col2
FROM table1