update student set userName='杨过' where id=4;
begin;
update student set userName='黄景瑜' where id=4;
select * from student where id=4;
rollback;
commit;


本文展示了在数据库中使用SQL语句进行学生表的更新(将id为4的学生名字改为杨过和黄景瑜),以及查询(id=4)的操作,最后包含rollback和commit事务管理命令。
update student set userName='杨过' where id=4;
begin;
update student set userName='黄景瑜' where id=4;
select * from student where id=4;
rollback;
commit;


1362

被折叠的 条评论
为什么被折叠?