adspace
what is constraints? Also explain the different types of constraints?
Answer Posted / Tanmay Singh
Constraints are rules that control the data inserted or updated in a database table. They help ensure the integrity and consistency of the data. The main types of constraints include PRIMARY KEY (unique, not null), UNIQUE (unique but may have NULLs), FOREIGN KEY (references another table's primary key), CHECK (defines valid values for columns), and DEFAULT (provides a default value when no value is specified).
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers