Search⌘ K

Inserting Data in Tables

Explore methods to insert data into tables using T-SQL. Understand how to add records to all columns or specific columns, adjust column value ordering, and insert multiple rows efficiently.

Adding data to a table is accomplished through the INSERT INTO command. We have several different options to use for inserting data.

Inserting data into all columns

The syntax for inserting into all columns is:

INSERT INTO TableSchema.TableName
VALUES (ValueForColumn1, ValueForColumn2, ...);

Note: The order of values must be the same as the order of columns when the table was created.

Let’s consider a situation where we create a table with this command:

 ...