What is a stored procedure? MCQ with Answer and Explanation

What is a stored procedure?
A. An index
B. A trigger
C. A view
D. A set of precompiled SQL statements that can be executed as a single unit
Answer: Option D
Solution (By JKExamLibrary)
A stored procedure is a named collection of SQL statements and logic stored in the database, which can be invoked by applications.

This question belongs to: Computer Database Management System (DBMS)

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1 Report Error
What is a candidate key in a relation?
A. A key that is not unique
B. A super key that is minimal
C. A foreign key
D. Any column that can be used as a primary key

Correct Answer: Option B


Explanation:
A candidate key is a minimal super key, meaning no subset of it can uniquely identify a row.

This question belongs to: Computer Database Management System (DBMS)
Question #2 Report Error
In normalization, 1NF requires that:
A. There are no transitive dependencies
B. The table has a primary key
C. There are no partial dependencies
D. All attributes have atomic values

Correct Answer: Option D


Explanation:
First Normal Form (1NF) ensures that each attribute contains only atomic (indivisible) values.

This question belongs to: Computer Database Management System (DBMS)
Question #3 Report Error
Which SQL keyword is used to remove a table from the database?
A. DELETE
B. DROP
C. TRUNCATE
D. REMOVE

Correct Answer: Option B


Explanation:
DROP TABLE is a DDL command that deletes the table and its structure from the database.

This question belongs to: Computer Database Management System (DBMS)