SQL INSERT: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 12: Line 12:
|-
|-
|}
|}
The column names and the values provided must correspond in number and type. The <code>INSERT</code> statement may not contain a <code>[[SQL_WHERE#Overview|WHERE]]</code> clause.
The column names and the values provided must correspond in number and type. The <code>INSERT</code> statement may not contain a <code>[[SQL_WHERE#Overview|WHERE]]</code> clause, because there is no previous data for this row <code>WHERE</code> may apply to.

Revision as of 22:10, 23 May 2024

Internal

Overview

INSERT INTO person (id, name) VALUES (1, 'Binh Ngo');
PostgreSQL MySQL

The column names and the values provided must correspond in number and type. The INSERT statement may not contain a WHERE clause, because there is no previous data for this row WHERE may apply to.