网站建设与管理论文的总结,php做购物网站,中细软网站建设,广州市建设局官方网站oracle中执行select … for update需要什么权限#xff1f;
问题
在oracle中#xff0c;一个用户执行select … for update需要什么权限#xff1f;
分析测试
用户1#xff1a; test_0614 用户2#xff1a;test 目标表#xff1a;test.t_0614 执行语句#xff1a;se…oracle中执行select … for update需要什么权限
问题
在oracle中一个用户执行select … for update需要什么权限
分析测试
用户1 test_0614 用户2test 目标表test.t_0614 执行语句select * from test.t_0614 where object_id16 for update;
只给select 权限
grant select on test.t_0614 to test_0614;
发现sql可以执行成功但在提交时报权限不足。此时有Row-X 行独占(RX)
只给update权限
grant update on test.t_0614 to test_0614;
sql语句在执行失败报权限不足。
给select update 权限
grant update on test.t_0614 to test_0614; grant select on test.t_0614 to test_0614;
sql能正常执行也能正常提交。
总结
1、只需要select权限就能执行select…for update 不能提交修改但会锁表所以这里可能会被坑。 2、完整执行select…for update 需要selectupdate 权限