Loading Data Driven Insights
Preparing your learning content.
Preparing your learning content.
A beginner-friendly guide to the SQL INSERT statement, with SQL Server-friendly examples for adding new rows into a table.
The INSERT statement is used to add new rows into a table.
You can use INSERT when you want to add one new record, add values into specific columns, store employee details, add product details, or save transaction records.
A basic INSERT statement names the table, lists the columns you want to fill, and then provides the values for those columns.
INSERT INTO table_name (column1, column2, column3)
VALUES (value1, value2, value3);
INSERT INTO Employees (employee_id, employee_name, department, salary)
VALUES (6, 'Ethan Moore', 'Finance', 45000);
Employees table.We will insert a new employee into this table.
This query inserts one new row into the Employees table.
INSERT INTO Employees (employee_id, employee_name, department, salary)
VALUES (6, 'Ethan Moore', 'Finance', 45000);
This query inserts one new row into the Employees table.
The new employee row has now been added to the Employees table.
INSERT adds new rows into a table. Always match the column list with the values list so the data goes into the correct columns.
INSERT is a DML command used to add new rows into an existing table. When you list specific columns, the values must follow the same order as those columns.
Learning SQL in order?
Use the roadmap to follow each SQL topic step by step, from relational database basics to advanced query techniques.
Back to SQL RoadmapRelated lessons
ALTER TABLE
A beginner-friendly guide to ALTER TABLE in SQL, including how to add, change, and remove columns from an existing table.
CREATE TABLE
A beginner-friendly guide to the SQL CREATE TABLE statement, including table planning, column names, data types, and a SQL Server-friendly example.
DELETE
A beginner-friendly guide to the SQL DELETE statement, with SQL Server-friendly examples for removing rows from a table safely.