QuestionQ64

PL/SQL Language Fundamentals

Review this table definition in the SH schema.

Question Image

A row whose PDT_ID = 1 exists. Which two code blocks will execute successfully as user SH and produce the same output?

Choose two
  • A
  • B
  • C
  • D
Explanation

For a dynamic SELECT that returns one row, EXECUTE IMMEDIATE requires an INTO clause to receive the selected columns and a USING clause for input bind values. A %ROWTYPE record is valid as the INTO target for SELECT *. Both valid blocks bind the value 1 to the sole placeholder and fetch the resulting row into rec, so they return the same record.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!