2.12 Constraints

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/3

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

4 Terms

1
New cards

constraint

is a rule that governs allowable values in a database. (blank) are based on relational and business rules.

  • The database automatically rejects insert, update, and delete statements that violate a (blank).

  • NOT NULL

  • DEFAULT

  • PRIMARY KEY

  • FOREIGN KEY

2
New cards

UNIQUE

constraint ensures that values in a column, or group of columns, are unique.

3
New cards

CHECK

constraint specifies an expression on one or more columns of a table. The constraint is violated when the expression is FALSE and satisfied when the expression is either TRUE or NULL.

4
New cards

SQL CONSTRAINT

  • Table constraints may be named using the optional CONSTRAINT keyword, followed by the constraint name and declaration

  • Adding and dropping constraints

    • Constraints are added and dropped with the ALTER TABLE TableName followed by an ADD, DROP, or CHANGE clause.