4.3、回滚事务
postgres=# begin;
BEGIN
postgres=# delete from tbase where id in (3,4);
DELETE 2
postgres=# select * from tbase;
id | nickname
----+-------------
1 | hello TBase
2 | TBase好
(2 rows)
postgres=# rollback;
ROLLBACK
Rollback后数据又回来了
postgres=# select * from tbase;
id | nickname
----+---------------
1 | hello TBase
2 | TBase好
3 | TBase好
4 | TBase default
(4 rows)