MySQL/INSERT: Difference between revisions
from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Created page with "==Usage== "INSERT" implies "INSERT INTO"; the "INTO" is always optional. Inserting a list of values:<source lang=mysql>INSERT table_name(col1,col2,col3...) VALUES (value1, val..." |
No edit summary |
||
| Line 1: | Line 1: | ||
== | {{fmt/title|"INSERT" SQL statement|see also: [[MariaDB/SQL/INSERT|in MariaDB]]}} | ||
"INSERT" implies "INSERT INTO"; the "INTO" is always optional. | ==Examples== | ||
Inserting a list of values: | Note: "<code>INSERT</code>" implies "<code>INSERT INTO</code>"; the "<code>INTO</code>" is always optional. | ||
Inserting the contents of another table or query (NOT YET VERIFIED): | * Inserting a list of values:{{fmt/syntax/block|SQL|INSERT table_name(col1,col2,col3...) VALUES (value1, value2, value3...)}} | ||
* Inserting the contents of another table or query (NOT YET VERIFIED):{{fmt/syntax/block|SQL|INSERT table_name(col1,col2,col3...) SELECT col1,col2,col3 FROM...}} | |||
==Links== | ==Links== | ||
* [https://dev.mysql.com/doc/refman/8.0/en/insert.html MySQL 8.0 Reference Manual] | * [https://dev.mysql.com/doc/refman/8.0/en/insert.html MySQL 8.0 Reference Manual] | ||
Latest revision as of 21:43, 18 February 2025
Examples
Note: "INSERT" implies "INSERT INTO"; the "INTO" is always optional.
- Inserting a list of values:Template:Fmt/syntax/block
- Inserting the contents of another table or query (NOT YET VERIFIED):Template:Fmt/syntax/block
