SELECT INTO
Assign query results to variables. This statement retrieves column values from a single row and stores them in local variables or user-defined variables.
Syntax
SELECT col_name [, col_name] ...
INTO var_name [, var_name] ...
table_exprDescription
Examples
SELECT id, data INTO @x,@y
FROM test.t1 LIMIT 1;
SELECT * FROM t1 WHERE t1.a=@x AND t1.b=@ySee Also
Last updated
Was this helpful?

