Comma separated list of values as different rows, not as fields for one row, for an SQL INSERT

Posted by Petruza on Stack Overflow See other posts from Stack Overflow or by Petruza
Published on 2010-04-09T13:50:35Z Indexed on 2010/04/09 13:53 UTC
Read the original article Hit count: 233

Filed under:
|
|
|
|

I want to make many inserts in a single SQL statement, pretty much like
INSERT INTO xxx SELECT field FROM zzz

But with values I don't have in a table, and are just a list of literals.
Normal way would be executing one SQL query for each value, but if there exists a standard SQL statement, or MySQL-specific, it would be great.

© Stack Overflow or respective owner

Related posts about insert

Related posts about from