Loading Data Driven Insights
Preparing your learning content.
Preparing your learning content.
A beginner-friendly guide to the SQL INSERT statement, including basic syntax, inserting a new row, and checking the updated table.
On this page
Jump to a lesson section
The INSERT statement is used to add new rows into a table.
You use it when you want to store a new record in your database, such as a new employee, customer, order, product, or transaction.
The basic structure uses INSERT INTO to choose the table and columns, then VALUES to provide the data.
INSERT INTO table_name (
column1,
column2,
column3
)
VALUES (
value1,
value2,
value3
);
INSERT INTO Employees (
employee_id,
employee_name,
department,
salary
)
VALUES (
5,
'Sophia Clark',
'Finance',
48000
);
We will use the Employees table and add one new employee using INSERT.
The following query inserts one new row into the Employees table.
INSERT INTO Employees (
employee_id,
employee_name,
department,
salary
)
VALUES (
5,
'Sophia Clark',
'Finance',
48000
);
After the insert runs successfully, the new employee appears as a new row in the table.
Always make sure the selected columns and supplied values match in the correct order.
SQL Roadmap Progress
Topic 8 of 111
7% complete
Next in SQL Roadmap
Continue with the next SQL topic in the recommended roadmap order.
Continue learning →