KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
My purpose is: to get multiple rows from a value list,like (1,2,3,4,5),('a','b','c','anything') and so on. mysql> select id from accounts where id in (1,2,3,4,5,6); +----+ | id | +----+ | 1 | | 2 | | 3 | | 5 | | 6 | +----+ 5 rows in set (0.00 sec) The above sql is surely ok,but my question is:is there a way to get the same result without specifying a table?Because my purpose here is just to propagate rows by an id_set another example: mysql> select now() as column1; +---------------------+ | column1 | +---------------------+ | 2009-06-01 20:59:33 | +---------------------+ 1 row in set (0.00 sec) mysql> This example propagated a single row result without specifying a table, but how to propagate multiple rows from a string like (1,2,3,4,5,6)?
Tags (comma-separated)
Save Edits
Cancel