SQL SELECT multi-columns INTO multi-variable

Viewed 155015

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?

2 Answers
Related