Insert Queries

From TRCCompSci - AQA Computer Science
Revision as of 13:25, 17 December 2016 by Admin (talk | contribs)
Jump to: navigation, search

INSERT adds rows to an existing table, there can be different syntax depending on specific version of SQL etc. For exam questions use one of the methods below. Also remember the values inserted should match the data types of the table fields.

Best Method

 INSERT INTO table
 (field1, field2, field3)
 VALUES
 (value1, value2, value3);

Alternative Method

 INSERT INTO table
 VALUES
 (value1, value2, value3);