Inserting a Row Using INSERT…Values

Accessing and Changing Relational Data

Accessing and Changing Relational Data

Inserting a Row Using INSERT...Values

The VALUES keyword specifies the values for one row of a table. The values are specified as a comma-separated list of scalar expressions whose data type, precision, and scale must be the same as or implicitly convertible to the corresponding column in the column list. If a column list is not specified, the values must be specified in the same sequence as the columns in the table or view.

For example, this statement inserts a new shipper into the Shippers table using the VALUES clause:

INSERT INTO Northwind.dbo.Shippers (CompanyName, Phone)
   VALUES (N'Snowflake Shipping', N'(503)555-7233')

A column list is required for this insert because the ShipperID column has the IDENTITY property; therefore, values cannot be inserted into it.

To insert data using INSERT

Transact-SQL