我提交了一个错误的UPDATE声明并丢失了一些数据.
在我已经承诺之后,现在可以回滚吗?
有帮助吗?
ROLLBACK
Run Code Online (Sandbox Code Playgroud)
说NOTICE: there is no transaction in progress.
在终端中使用sql在我的PostgreSQL数据库中编辑一些记录时(在ubuntu lucid中),我做了一个错误的更新.
代替 -
update mytable set start_time='13:06:00' where id=123;
Run Code Online (Sandbox Code Playgroud)
我打字 -
update mytable set start_time='13:06:00';
Run Code Online (Sandbox Code Playgroud)
因此,所有记录现在具有相同的start_time值.
有没有办法撤消这种变化?表中有大约500条记录,我不知道每条记录的start_time值是多少
它会永远丢失吗?