×
Menu
Index

SQL Command INSERT

 
The INSERT command has the following specification:
 
INSERT INTO TableName (field1, [field2],...,[fieldN])
VALUES (value1, [value2], ...,[valueN])
 
where:
 
TableName – specify the name of the table for which the command is applied.
 
field1, field2,…, fieldN – the fields to be updated. If the table has a key column, this column must be listed in the statement and it must have a unique value. Otherwise, the command will fail.
 
value1, value2,…, valueN – the values inserted into fields listed in the statement.
The table fields which are not listed in the statement will have a default value which, in our case, is a NULL value.
The values must be enclosed using single quota.
 
Example
insert into params (name,value) values ("buzzer volume", "2")