Question 1
Topic: Declaring PL/SQL Variables
Skill tested: Declare a variable with %TYPE and initialize it from a table column.
A billing procedure must retain the current value of `ACCOUNT_BALANCE` for one account before applying a set of adjustments. The balance column is `NUMBER(12,2)`, and the development team wants the PL/SQL variable to track future changes to the column's declared type without duplicating its definition. The procedure receives `p_account_id`; the account is guaranteed to exist. Which declaration and initialization correctly capture the value at the start of the executable section?
A variable declared as `accounts.account_balance%TYPE` inherits the column's datatype and precision, so it remains aligned if the column definition changes. The `SELECT ... INTO` statement retrieves the value for the specified account and assigns it to the variable. A names a column as if it were a PL/SQL expression and hard-codes the type. C uses invalid attribute syntax and does not retrieve the balance. D declares a constant without an initialization value; constants must be initialized at declaration and cannot later receive a SELECT result.