using SET datatype in mysql

Posted by Dan Snyder on Stack Overflow See other posts from Stack Overflow or by Dan Snyder
Published on 2009-10-02T14:59:43Z Indexed on 2010/04/17 0:03 UTC
Read the original article Hit count: 336

Filed under:

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

© Stack Overflow or respective owner

Related posts about mysql