185.User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK,

    xiaoxiao2026-04-01  10

    185.User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK, or any data definition language (DDL) command: SQL> SELECT ename FROM emp WHERE job='CLERK' FOR UPDATE OF empno; SCOTT has opened another session to work with the database instance. Which three operations would wait when issued in SCOTT's second session? (Choose three.) A.LOCK TABLE emp IN SHARE MODE; B.LOCK TABLE emp IN EXCLUSIVE MODE; C.UPDATE emp SET sal=sal*1.2 WHERE job=MANAGER; D.INSERT INTO emp(empno,ename) VALUES (1289,'Harry'); E.SELECT ename FROM emp WHERE job='CLERK' FOR UPDATE OF empno; 答案:ABE 解析:这个select ... for update 是在TX加上了S锁,在TM上增加了SX锁,  因此不能在TX上增加X锁,不能在TM上增加S、SSX、X锁 A:正确,这个相当于TMS锁 B:正确,这个是TM的X锁 C:这里只是TM的SX锁 D:和C一样 E:正确,这里是SX锁,锁的是不同的记录
    转载请注明原文地址: https://ju.6miu.com/read-1308387.html
    最新回复(0)