xxxxxxxxxx
INSERT INTO table1 (col1, col2)
SELECT col1, col2
FROM othertable
xxxxxxxxxx
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
xxxxxxxxxx
with x (id) as (
insert into
returning id
), t2_insert as (
insert into t2 (id)
select id
from x
)
insert into t3
select id
from x;