CREATE TEMPORARY TABLE t1 (i INT, t TEXT) USING memoryam; INSERT INTO t1 VALUES (1, 'hello'); -- should be one entry SELECT * FROM t1; i | t ---+------- 1 | hello (1 row) BEGIN; INSERT into t1 VALUES (2, 'world'); -- should be two entries SELECT * FROM t1; i | t ---+------- 1 | hello 2 | world (2 rows) ROLLBACK; -- should be back to one entry SELECT * FROM t1; i | t ---+------- 1 | hello (1 row) BEGIN; -- should be two entries INSERT INTO t1 VALUES (2, 'world'); SELECT * FROM t1; i | t ---+------- 1 | hello 2 | world (2 rows) COMMIT; -- should still be two entries SELECT * FROM t1; i | t ---+------- 1 | hello 2 | world (2 rows) BEGIN; DELETE FROM t1 WHERE i = 2; -- should be one entry SELECT * FROM t1; i | t ---+------- 1 | hello (1 row) ROLLBACK; -- should be back to two entries SELECT * FROM t1; i | t ---+------- 1 | hello 2 | world (2 rows) BEGIN; DELETE FROM t1; -- should be no entries SELECT * FROM t1; i | t ---+--- (0 rows) COMMIT; -- should still be no entries SELECT * FROM t1; i | t ---+--- (0 rows) DROP TABLE t1;