フリー問題

Oracle Database Program with PL/SQL のフリー問題 20 / 20 問目

問題文

A procedure has to build a query whose table name comes from a parameter, and another part of the same procedure has to create a table. Which description of when dynamic SQL is needed is correct?

選択肢

  1. Dynamic SQL is needed when the text of the statement is not known while the unit is being compiled, and it is also needed for the statements that static SQL does not support at all, so both parts of the procedure need it.
  2. Dynamic SQL is needed when the statement reads more than one table, and it is also needed when the statement changes rows, so the query needs it while the creation of the table can be written as static SQL.
  3. Dynamic SQL is needed when the statement runs inside a loop, and it is also needed when the statement is written inside a package, so the query needs it while the creation of the table does not.
  4. Dynamic SQL is needed when the statement has to be checked at run time rather than at compile time, and static SQL is the choice when a table name comes from a parameter of the unit.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。