| Bug #12283 | Multiple INSERT syntax? | ||
|---|---|---|---|
| Submitted: | 30 Jul 2005 7:45 | Modified: | 17 Dec 2010 13:23 |
| Reporter: | Keith Roberts | Email Updates: | |
| Status: | Won't fix | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S4 (Feature request) |
| Version: | 4.0.21-Max | OS: | Linux (SuSE Linux 9.2 pro) |
| Assigned to: | CPU Architecture: | Any | |
[30 Jul 2005 14:00]
Keith Roberts
Original post should read as:
Also, what about a multiple INSERT query.
So as well as doing:
INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
[INTO] tbl_name
SET col_name={expr | DEFAULT}, ...
[ ON DUPLICATE KEY UPDATE col_name=expr, ... ]
being able to do:
INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
[INTO] tbl_name [, tbl_name ...]
SET tbl_name.col_name={expr | DEFAULT}, ...
[ ON DUPLICATE KEY UPDATE tbl_name.col_name=expr, ... ]
Or even something like:
INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
SET tbl_name.col_name={expr | DEFAULT}, ...
[ ON DUPLICATE KEY UPDATE tbl_name.col_name=expr, ... ]
[17 Dec 2010 13:23]
Susanne Ebrecht
Many thanks for writing a feature request. Unfortunately, your suggestion would not be sql standard conform and we try to be conform here with the standard.

Description: Hi all. A couple of feature requests. Would it possible for tables to be grouped in a database like: db_name.tbl_group.tbl_name.col_name? This would allow large company databases with many tables to be organised into related groups - still keeping the tables all together under one database though. Also, what about a multiple INSERT query. So as well as doing: INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name SET col_name={expr | DEFAULT}, ... [ ON DUPLICATE KEY UPDATE col_name=expr, ... ] being able to do: INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] db_name.tbl_name [, db_name.tbl_name ...] SET db_name.col_name={expr | DEFAULT}, ... [ ON DUPLICATE KEY UPDATE db_name.col_name=expr, ... ] Or even something like: INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] SET db_name.col_name={expr | DEFAULT}, ... [ ON DUPLICATE KEY UPDATE db_name.col_name=expr, ... ] So this would allow the insertion of many different rows and columns into multiple tables at a time, without having to write multiple INSERT statements in one query. Obviously, any col_names not supplied would be set to their default values. Keith Roberts How to repeat: This is not a bug but a feature request! Suggested fix: Update MySQL source code!