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. 984315 fiddles created (11688 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;
Msg 8134 Level 16 State 1 Line 1 Divide by zero error encountered. Msg 3621 Level 0 State 0 Line 1 The statement has been terminated.
 hidden batch(es)


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


commit;
 hidden batch(es)


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