Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLtransactions BEGIN COMMITSingle-choice MCQ

You wrap a CREATE TABLE plus several INSERTs inside BEGIN ... and then issue ROLLBACK because of an error. In PostgreSQL, what is the state of the new table afterward?

BEGIN; CREATE TABLE staging (id int); INSERT INTO staging VALUES (1), (2); -- error happens here ROLLBACK;