40.6k views
1 vote
If a 'constraint' is added in SQL, what does this mean?

a. A limitation on data types
b. A rule applied to enforce data integrity
c. An additional field in a database
d. A condition for query optimization

User Grobber
by
8.6k points

1 Answer

1 vote

Final answer:

A constraint in SQL is a rule applied to enforce data integrity.

Step-by-step explanation:

In SQL, a constraint refers to a rule or condition applied to enforce data integrity. It ensures that the data being inserted, updated, or deleted in the database follows a set of predefined rules. Constraints can be used to enforce various limitations, such as ensuring that a certain column cannot have null values or that a column can only contain unique values.

User Gcedo
by
7.9k points