update操作之后马上就系统自动对表解锁了  ????
没commit ,rollback 不会解锁

解决方案 »

  1.   

    系统环境: 
    1、操作系统:Windows 2000
    2、数据库: Oracle 8i R2 (8.1.6) for NT 企业版
    3、安装路径:C:\ORACLE实现方法: 利用SELECT的FOR UPDATE子句实现conn system/manager--创建实验用户
    grant connect,resource to test identified by test;conn test/test--创建实验表1
    create table a(a number);
    insert into a values(1);
    commit;select * from a for update;

    select * from a for update of a.a;(a表的a列)--新打开一个SQL*Plus窗口
    conn test/test(test用户上的第二个会话)
    delete from a;此时,系统停顿状态,等待解锁,
    只要在第一个窗口发出roll;或commit;命令,即可解除锁定状态。
      

  2.   

    我不是用sqlplus对数据库进行操作的,是应用在vb里对oracle进行操作时。我知道在sqlplus里要用commit。在vb中,打开一个recordset(用for update 方法锁定),然后addnew,然后update,这时sqlplus出等待的锁表命令执行了,表示recordset处的表锁定已经解锁。