QuestionQ38Verified/PL/SQL Language FundamentalsCopy linkReport a problemAsk AstroTutorSave questionExamine the following statements from a code block: Which two statements are true?Choose twoAThe lock acquired when executing the OPEN c1 command will be released only after a COMMIT or ROLLBACK statement is issued.BOnly the PRICE column can be updated in the PRODUCTS table.CThe FOR UPDATE OF clause can be used only if the WHERE CURRENT OF clause is used in the executable part of the block.DThe WHERE CURRENT OF clause can be used only if the FOR UPDATE clause is used in the cursor definition.EAn OPEN c1 command will acquire a lock only on the PRICE column in the PRODUCTS table.Show AnswerAnswerExplanationOpening a FOR UPDATE cursor locks the selected rows, and those locks are released when the transaction commits or rolls back. A WHERE CURRENT OF update requires the named cursor to be a FOR UPDATE cursor. The lock is row-level rather than limited to the PRICE column.Learn moreOracle Database PL/SQL Static SQLOracle Database PL/SQL UPDATE Statement ExtensionsShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion