提交 239a6a42 编写于 作者: M Mars Liu

rollback

上级 da725e79
{ {
"keywords": [], "keywords": [],
"node_id": "oceanbase-173dda0ef67d4d178b9454191b8a2c7e", "node_id": "oceanbase-173dda0ef67d4d178b9454191b8a2c7e",
"title": "回滚事务" "title": "回滚事务",
"export": ["rollback.md"]
} }
\ No newline at end of file
{
"type": "code_options",
"author": "刘鑫",
"source": "rollback.md"
}
\ No newline at end of file
# Rollback
下列哪一个选项可以正确的回滚写入?
## 答案
```sql
begin;
insert into cust(c_city, c_first, c_last) select 'Tian Jin', 'Mars', 'Liu';
rollback ;
```
## 选项
### 先 commit 了
```sql
begin;
insert into cust(c_city, c_first, c_last) select 'Tian Jin', 'Mars', 'Liu';
commit;
rollback ;
```
### 不必要的 end
```sql
begin;
insert into cust(c_city, c_first, c_last) select 'Tian Jin', 'Mars', 'Liu';
rollback ;
end;
```
### 没有发起事务
```sql
insert into cust(c_city, c_first, c_last) select 'Tian Jin', 'Mars', 'Liu';
rollback ;
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册