SQL Insert

SQL Insert

The SQL command INSERT is used to insert records into an SQL table.

Insert syntax

INSERT INTO table_name
(
column_name1,
column_name2,
column_name3,
...
) VALUES (
value1,
value2,
value3,
...
);

Insert example

INSERT INTO coder_books (id, title, price, description) 
VALUES (1, 'Learn SQL', 20, 'Learn SQL language');

INSERT INTO coder_books (id, title, price, description) 
VALUES 
(2, 'Learn MySQL', 22, 'Learn MySQL language'),
(3, 'HTML book', 17, 'Learn HTML');