I want to make many attachments in a single SQL statement, pretty much similar toINSERT INTO xxx SELECT field FROM zzz
INSERT INTO xxx SELECT field FROM zzz
But with values ββthat I don't have in the table, and this is just a list of literals.The usual way would be to execute one SQL query for each value, but if there is a standard SQL query or MySQL-specific, it would be great.
insert into xxx (fields) values (values1), (values2), (values3)
eg insert into mytable (name, desc) values ('name1','desc1'), ('name2','desc2'), ('name3','desc3'), ('name4','desc4')
insert into mytable (name, desc) values ('name1','desc1'), ('name2','desc2'), ('name3','desc3'), ('name4','desc4')
insert into xxx(afield) select 'a' union select 'b' union select 'x'
will give you a table:
a
b
x
Source: https://habr.com/ru/post/1306478/More articles:Can the size of the structure change after compilation? - cHow can I make JDOM / XPath ignore namespaces? - xmlUITableView scroll performance paradox: Make subviews or use -drawRect :? - iphoneC ++ opengl: how can I combine 2 different types of projection for 3D graphics and 2-dimensional menus? - c ++Apache - Tomcat ProxyPass VirtualHost - Context Path - tomcatEfficient suffix array algorithm in C # - c #java: how can I create a dynamic array without forcing a value type? - java"One of the query input errors failed" when trying to update the Azure table storage - azurephp -iHow to display in a log window in perforce client p4v using custom tools - pythonAll Articles