Classwork 69686 2
Classwork 69686 2
DATABASE CONCEPTS
AND
SESSION 08
1
Creating table with constraints:
A constraint is condition or check applicable on a field or set of fields.
Constraints are important to maintain data integrity.
Syntax:
Different constraints:
1. NOT NULL
2. PRIMARY KEY
3. UNIQUE
4. CHECK
5. DEFAULT
6. FOREIGN KEY
1. NOT NULL: All the rows in the specified column should have some values.
2
3. UNIQUE: This constraint ensures that no two rows have the same value in
the specified column.