in a TRIGGER i must be check two fields with a SELECT result
is possible to declare a local variable as array list to storing a SELECT result such as :
SELECT lid FROM lang WHERE state=1 ;
this SELECT statement return me always more than one result
if is possible to definition it and what is the variable type for a list ?
Not sure what is your goal.
But just a guess. You don't need any variable but you can use IN
condition:
http://sqlfiddle.com/#!9/f1434/1
SELECT *
FROM t1
WHERE lang_id IN (SELECT lid FROM lang WHERE state=1 )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.