Reputation: 32733
I have 20 items. Is it possible to insert 20 items only with one query (without loops)?
Upvotes: 0
Views: 162
Reputation: 10495
INSERT into `table` (`1`,`2`,`3`....`20`) VALUES (`value1`,`value2`,`value3`,...`value20`)
Upvotes: 0
Reputation: 36546
Look into syntax like this:
INSERT INTO table (column) VALUES (item1), (item2), (item3), ...
Upvotes: 7