fork download
  1. create table tbl(str varchar(20));
  2. insert into tbl values('Hello world!');
  3. select * from tbl;
  4. begin
  5. for i in 1 .. 2 loop
  6. insert into tbl values('1 world');
  7. print 2
  8. commit;
  9. end;
  10. select * from tbl;
Success #stdin #stdout #stderr 0.01s 5532KB
stdin
Standard input is empty
stdout
Hello world!
Hello world!
stderr
Error: near line 4: near "for": syntax error
Error: near line 7: near "print": syntax error
Error: near line 9: cannot commit - no transaction is active