SQL – Constraints

 0    8 flashcards    sir
download mp3 print play test yourself
 
Question Answer
Ensures that a column cannot have a NULL value
start learning
NOT NULL
Ensures that all values in a column are different
start learning
UNIQUE
A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table
start learning
PRIMARY KEY
[MySQL:] UserId auto_increment primary key
Uniquely identifies a row/record in another table
start learning
FOREIGN KEY
Ensures that all values in a column satisfies a specific condition
start learning
CHECK
Sets a default value for a column when no value is specified
start learning
DEFAULT
Used to create and retrieve data from the database very quickly
start learning
INDEX
It's like a declaration of default value that increments by 1 for each record.
start learning
auto_increment
SQLite: autoincrement

You must sign in to write a comment