INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [PARTITION (partition_list)] [(col,...)] {VALUES | VALUE} ({expr | DEFAULT},...), (...),... [ ON DUPLICATE KEY UPDATE col=expr, col=expr ... ] INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [PARTITION (partition_list)] SET col={expr | DEFAULT}, ... [ ON DUPLICATE KEY UPDATE col=expr, col=expr ... ] INSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [PARTITION (partition_list)] [(col,...)] SELECT ... [ ON DUPLICATE KEY UPDATE col=expr, col=expr ... ] INSERT INTO person (first_name, last_name) VALUES ('John', 'Doe'); INSERT INTO tbl_name VALUES (1, "row 1"), (2, "row 2"); INSERT INTO person SET first_name = 'John', last_name = 'Doe'; INSERT INTO contractor SELECT * FROM person WHERE status = 'c';
SQL Справочник v0.05 © 2007-2025 Igor Salnikov aka SunDoctor