Back to SQL Notes
Topic #77

SQL INSERT Statement

INSERT INTO adds new rows to a table.

Syntax

INSERT INTO table_name (column1, column2, ...)
VALUES (value1, value2, ...);

Example — Single Row

INSERT INTO employees (name, department, salary)
VALUES ('Neha', 'Design', 48000);

Example — Multiple Rows in One Statement

INSERT INTO employees (name, department, salary) VALUES
('Aman', 'Engineering', 65000),
('Riya', 'Marketing', 52000),
('Karan', 'Engineering', 71000);

Inserting multiple rows in one statement is significantly faster than running separate INSERT statements one at a time, since it avoids repeated round-trips to the database.

INSERT INTO ... SELECT — Copying Data

INSERT INTO archived_orders
SELECT * FROM orders WHERE order_date < '2023-01-01';

Copies rows from one table's query result directly into another — no need to pull data out and back in through application code.

Common Mistakes

  • Column/value order mismatch — values are matched to columns positionally; swapping the order silently puts data in the wrong column if types happen to be compatible
  • Omitting a required (NOT NULL, no default) column — causes the insert to fail
  • Skipping the column list entirely (INSERT INTO employees VALUES (...)) — works, but breaks silently if the table's column order ever changes; always name columns explicitly

Interview Relevance

You may be asked to write an INSERT INTO ... SELECT to migrate or archive data — a very common real-world data engineering pattern, not just a syntax exercise.

Practice Question

Write a statement that inserts 3 new students into a students table with columns (name, course) in a single statement.

Want to go beyond the notes?

Join Coding Now Tech Institute's SQL course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

SQL INSERT Statement – FAQs

Quick answers about learning SQL INSERT Statement in SQL.

This free note from Coding Now Tech Institute explains SQL INSERT Statement in SQL — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every SQL topic on Coding Now Tech Institute, including SQL INSERT Statement, is 100% free with no signup required.
With focused practice, most students grasp SQL INSERT Statement in 1–3 days from these notes; pairing it with Coding Now Tech Institute's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the Coding Now Tech Institute Community (/community) — expert instructors answer within 24 hours.
Call NowEnroll Now