This is a discussion on Can a local variable in MYSQL be a list? within the MySQL Database forums, part of the Database Forums category; Hi, I'd like to have a list of ID's that I can reuse in several queries in the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I'd like to have a list of ID's that I can reuse in several queries in the same sql-script. Is this possible? I get ' Operand should contain 1 column(s)' when I try this: set @mylist := (139, 439, 7947); What I want is to make (several) tables using this syntax: create table foo select * from bar where bar.ID in @mylist; Cheers, S |