Which of the following is a valid constraint in SQL? MCQ with Answer and Explanation

Which of the following is a valid constraint in SQL?
A. PRIMARY KEY
B. FOREIGN KEY
C. All of the above
D. CHECK
Answer: Option C
Solution (By JKExamLibrary)
CHECK, PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL are all constraints in SQL.

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
In a Relational Database Management System (RDBMS), data is logically organized and stored in which form?
A. Tables
B. Graphs
C. Flat text files
D. Trees

Correct Answer: Option A


Explanation:
In an RDBMS, data is organized into relations, which are logically represented as two-dimensional tables consisting of rows and columns.

This question belongs to: Computer Database Management System (DBMS)
Question #2 Report Error
What is the purpose of the COMMIT statement in SQL?
A. To save a point within a transaction
B. To permanently save all changes made in a transaction
C. To undo all changes made in a transaction
D. To start a new transaction

Correct Answer: Option B


Explanation:
COMMIT finalizes a transaction, making all changes permanent in the database.

This question belongs to: Computer Database Management System (DBMS)
Question #3 Report Error
What is a self join?
A. Joining more than two tables
B. Joining a table with itself
C. Joining two different tables
D. Joining tables without a common column

Correct Answer: Option B


Explanation:
A self join is a join where a table is joined with itself, often used to compare rows within the same table.

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