Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

VALUES

VALUES

The VALUES command specifies the values for an INSERT INTO statement.

The following SQL inserts a new record into the “Customers” table:

Example

INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES (‘Cardinal’, ‘Tom B. Erichsen’, ‘Skagen 21’, ‘Stavanger’, ‘4006’, ‘Norway’)
;

The following SQL inserts a new record, populating only the “CustomerName”, “City”, and “Country” columns (CustomerID will be automatically generated):

Example

INSERT INTO Customers (CustomerName, City, Country)
VALUES (‘Cardinal’, ‘Stavanger’, ‘Norway’);