Skip to content
Justice Tech School

Insert Several Rows

One INSERT can add many rows with comma separated value lists.

Example
INSERT INTO courses (title, price, level)
VALUES ('Go', 9000, 'Beginner'), ('Rust', 11000, 'Intermediate');
SELECT COUNT(*) AS total FROM courses;

Result

total
7

Exercise

Values keyword.

INSERT INTO t  (1), (2);

Quiz Test

How do you add many rows?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.