158.Which statements are true regarding the FOR UPDATE clause in a SELECT statement? (Choose all that apply.)
A.It locks only the columns specified in the SELECT list.
B.It locks the rows that satisfy the condition in the SELECT statement.
C.It can be used only in SELECT statements that are based on a single table.
D.It can be used in SELECT statements that are based on a single or multiple tables.
E.After it is enforced by a SELECT statement, no other query can access the same rows until a COMMIT or ROLLBACK is issued.
答案:BD
解析:for update 是锁定满足条件的整行记录,独占锁
E这里保持怀疑,ddl和dcl应该也是可以释放锁的
A.It locks only the columns specified in the SELECT list.
B.It locks the rows that satisfy the condition in the SELECT statement.
C.It can be used only in SELECT statements that are based on a single table.
D.It can be used in SELECT statements that are based on a single or multiple tables.
E.After it is enforced by a SELECT statement, no other query can access the same rows until a COMMIT or ROLLBACK is issued.
答案:BD
解析:for update 是锁定满足条件的整行记录,独占锁
E这里保持怀疑,ddl和dcl应该也是可以释放锁的