using SET datatype in mysql
- by Dan Snyder
Is it possible to set a varaible to a query result such as:
DECLARE result INT;
SET result = (SELECT index FROM table WHERE data = 'xxxx' LIMIT 1);
Assuming of course you know that there will only be one result set