Sql multiple insert postgres

This article is tagged with: Sql multiple insert postgres and mysql

sql multiple insert postgres

INSERT INTO User (name, surname, "roomId") // roomId is with quetes("") because it is case sensitive in this example
VALUES
('Joe', 'Travolta', 1),
('Jim', 'Carrey', 2),
('Shakira', 'whenever', 3); // remember about semicolon(;) at the end

postgresql insert multiple rows

INSERT INTO table_name (column_list)
VALUES
(value_list_1),
(value_list_2),
...
(value_list_n);

This article is tagged with: Sql multiple insert postgres and mysql