Udostępnij za pośrednictwem


Inserting a Row by Using INSERT and 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, the following statement inserts a new unit of measure into the UnitMeasure table by using the VALUES clause.

USE AdventureWorks;
GO
INSERT INTO Production.UnitMeasure
VALUES (N'F2', N'Square Feet', GETDATE());
GO

To insert data by using INSERT

INSERT (Transact-SQL)

See Also

Concepts

Adding Rows by Using INSERT and SELECT
Limiting Inserted Rows by Using TOP
Inserting Rows by Using INSERT and SELECT Subqueries
Inserting Rows by Using SELECT INTO

Help and Information

Getting SQL Server 2005 Assistance