clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 984322 fiddles created (11677 in the last week).

create table DEMO (n int);
 hidden batch(es)


begin transaction;
 hidden batch(es)


insert into DEMO values (0);
1 rows affected
 hidden batch(es)


select n "after insert" from DEMO;
after insert
0
 hidden batch(es)


update DEMO set n=1/n;
ERROR: division by zero
 hidden batch(es)


select n "after error" from DEMO;
ERROR: current transaction is aborted, commands ignored until end of transaction block
 hidden batch(es)


commit;
 hidden batch(es)


select n "after commit" from DEMO;
after commit
 hidden batch(es)