What is true about stored procedures?
-
A stored procedure uses the DELCLARE keyword in the procedure specification to declare formal parameters
-
A stored procedure is named PL/SQL block with at least one parameter declaration in the procedure specification.
-
A stored procedure must have at least one executable statement in the procedure body.
-
A stored procedure uses the DECLARE keyword in the procedure body to declare formal parameters.
A stored procedure must have at least one executable statement in its body (even NULL). It need not have parameters (B wrong). Parameters are declared in the specification, not with DECLARE keyword (A, D wrong).
A PL/SQL stored procedure's body (the section between BEGIN and END) must contain at least one executable statement — even a bare NULL; statement satisfies this requirement, but the body cannot be empty. This is correct. The other options confuse specification vs. body syntax: parameters are declared in the procedure specification's parameter list (e.g., PROCEDURE foo(p_id IN NUMBER)), not via a DECLARE keyword — DECLARE is used for local variables in the declarative section of the body, not for formal parameters. A procedure also doesn't require at least one parameter — parameterless procedures are valid. So the only true statement is that the body needs at least one executable statement.