MySQL/INSERT

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
"INSERT" SQL statement
see also: in MariaDB

Examples

Note: "INSERT" implies "INSERT INTO"; the "INTO" is always optional.

  • Inserting a list of values:
    INSERT table_name(col1,col2,col3...) VALUES (value1, value2, value3...)
    
  • Inserting the contents of another table or query (NOT YET VERIFIED):
    INSERT table_name(col1,col2,col3...) SELECT col1,col2,col3 FROM...
    

Links