如果是MS SQL Server, 如下应该可以:select * from tablename with (ROWLOCK) where 条件1 union select * from tablename with (ROWLOCK) where 条件2 order by ...你用的是Oracle吧?算我白说。
To Fita: 用你的方法,把整个数据用readonly取来,没法在update. 我想做的是类是与for update of的方式把表所定然后update,commit. 能做到吗?
union
select * from tablename with (ROWLOCK) where 条件2
order by ...你用的是Oracle吧?算我白说。
用你的方法,把整个数据用readonly取来,没法在update.
我想做的是类是与for update of的方式把表所定然后update,commit.
能做到吗?
感谢你回答我的问题,可惜你说的对,我用的是oracle.