Which of the following is not constraint in SQL?
2023
Which of the following is not constraint in SQL?
- A.
Primary key
- B.
Not null
- C.
Union
- D.
More than one of the above
- E.
None of the above
Attempted by 1479 students.
Show answer & explanation
Correct answer: C
In SQL, constraints are used to enforce rules on data in a table. Common constraints include PRIMARY KEY, NOT NULL, UNIQUE, FOREIGN KEY, and CHECK. PRIMARY KEY ensures that each row in a table is uniquely identified and that the column does not contain NULL values. NOT NULL constraint ensures that a column cannot have NULL values, thus maintaining data integrity. UNION is not a constraint; it is a SQL operator used to combine the results of two or more SELECT statements into a single result set. Therefore, among the given options, UNION is not a constraint in SQL.