zoukankan      html  css  js  c++  java
  • 052-186

    User A executes the following command to drop a large table in your database:
    SQL> DROP TABLE trans;
    While the drop table operation is in progress, user B executes the following command on the same table:
    SQL> DELETE FROM trans WHERE tr_type='SL';
    Which statement is true regarding the DELETE command?
    A.It fails with a "Resource Busy" error.
    B.It deletes the rows successfully because the table is locked in SHARE mode.
    C.It fails to delete the records because the table is locked in EXCLUSIVE mode.
    D.It deletes the rows successfully because the table is locked in SHARE ROW EXCLUSIVE mode.

    DDL锁介绍 http://liwenshui322.iteye.com/blog/1166934
    当执行 alter table,drop table,drop index,truncate table,lock exclusive 的时候会造成 excluvise 锁,因此 B错,C 对
    当执行 lock share row exclusive 的时候会造成共享排他锁,排除 D
    当执行 insert,update,delete,lock row share 的时候会造成行级排他锁,在提交前不允许做 dml 操作,因此排除A

  • 相关阅读:
    request转换为java bean
    idea中快捷键
    idea中Terminal显示中文乱码
    idea解决tomcat控制台中文乱码问题
    需要看的url
    常用网站
    反射
    5、运算符
    4、变量
    2、Hello Word讲解
  • 原文地址:https://www.cnblogs.com/Babylon/p/8042979.html
Copyright © 2011-2022 走看看