Answers for "store select query result in variable sql"

SQL
1

store select query result in variable sql server

DECLARE @result1 TABLE (a INT, b INT, c INT)

INSERT INTO @result1
SELECT a, b, c
FROM table1

SELECT a AS val FROM @result1
UNION
SELECT b AS val FROM @result1
UNION
SELECT c AS val FROM @result1
Posted by: Guest on March-29-2021
0

how to store the query result in a variable sql

SET @anyVariableName = ( yourQuery);
Posted by: Guest on September-22-2020

Code answers related to "store select query result in variable sql"

Code answers related to "SQL"

Browse Popular Code Answers by Language