HuyPV
Saturday, October 22, 2011
Keyword: variable, procedure, function, select, set, assign, from
http://dev.mysql.com/doc/refman/5.1/en/select-into-statement.html
DECLARE x VARCHAR(255);
DECLARE y VARCHAR(255);
SELECT id,data INTO x,y FROM test.t1 LIMIT 1;
The query should return a single row. If the query returns no rows, a warning with error code 1329 occurs (No data), and the variable values remain unchanged. If the query returns multiple rows, error 1172 occurs (Result consisted of more than one row).
Title:
mysql set variable from select
Description:
Keyword: variable, procedure, function, select, set, assign, from http://dev.mysql.com/doc/refman/5.1/en/select-into-statement.html DECL...
...
Rating:
4