Difficulty: Easy
Correct Answer: They include procedural and SQL statements.
Explanation:
Introduction / Context:
Procedures (stored procedures) and functions are core programmable objects in DBMSs. They encapsulate business logic close to the data and are invoked by applications, jobs, or triggers. This question targets the essential characteristics of a procedure.
Given Data / Assumptions:
Concept / Approach:
A procedure is a stored program consisting of procedural logic (IF, CASE, loops) and embedded SQL (SELECT, INSERT, UPDATE, DELETE). It is compiled/stored in the database catalog and invoked by name, often with parameters.
Step-by-Step Solution:
Verification / Alternative check:
Vendor docs show CREATE PROCEDURE with procedural control structures and embedded SQL. Functions often have RETURN types; procedures typically do not (though dialects vary).
Why Other Options Are Wrong:
Not created with SQL is false; CREATE PROCEDURE is SQL.
No unique name is false; uniqueness is required within scope.
Same as a function is false; functions and procedures differ in invocation and return semantics.
Common Pitfalls:
Assuming procedures must return values (that is functions), and overlooking schema-qualified naming.
Final Answer:
They include procedural and SQL statements.
Discussion & Comments