SQL – Constraints

 0    8 fiszek    sir
ściągnij mp3 drukuj graj sprawdź się
 
Pytanie Odpowiedź
Ensures that a column cannot have a NULL value
rozpocznij naukę
NOT NULL
Ensures that all values in a column are different
rozpocznij naukę
UNIQUE
A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table
rozpocznij naukę
PRIMARY KEY
[MySQL:] UserId auto_increment primary key
Uniquely identifies a row/record in another table
rozpocznij naukę
FOREIGN KEY
Ensures that all values in a column satisfies a specific condition
rozpocznij naukę
CHECK
Sets a default value for a column when no value is specified
rozpocznij naukę
DEFAULT
Used to create and retrieve data from the database very quickly
rozpocznij naukę
INDEX
It's like a declaration of default value that increments by 1 for each record.
rozpocznij naukę
auto_increment
SQLite: autoincrement

Musisz się zalogować, by móc napisać komentarz.