CBSE Class 12 Computer Science Question 51 of 79

Table Creation and Data Manipulation Commands — Question 6

Back to all questions
6
Question

Question 6

What are table constraints ? What are column constraints ? How are these two different ?

Answer

Table constraints are rules or conditions applied to an entire table in a database. They are defined when creating or altering a table's schema.

Column constraints are rules or conditions applied to individual columns within a database table. They are specified at the column level when creating or altering a table's schema.

The difference between the two is that column constraints apply only to individual columns, whereas table constraints apply to groups of one or more columns.