SQL Server Constraints Flashcards

1
Q

NOT NULL

A

Ensures that a column cannot have a NULL or empty value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

UNIQUE

A

Ensures that all values in a column are different

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

PRIMARY KEY

A

Uniquely identifies each row in a table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

FOREIGN KEY

A

Used to create the link to another table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

CHECK

A

Ensures that all values in a column satisfy a specific condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

DEFAULT

A

Sets a default value for a column when no value is specified; for example, set a default for state if most customers are from FL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

INDEX

A

Used to create and retrieve data from the database very quickly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

CONSTRAINT

A

Is a rule in the database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly