1.7 Null Values Flashcards

1
Q

NULL

A

NULL is a special value that represents either unknown or inapplicable data.

NULL is not the same as zero for numeric data types or blanks for character data types. Ex: A zero bonus indicates an employee can, but has not, earned a bonus. A zero bonus is known and applicable, and should not be represented as NULL.

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

NOT NULL constraint

A

The NOT NULL constraint prevents a column from having a NULL value. Statements that insert NULL, or update a value to NULL, are automatically rejected.

Name VARCHAR(60) NOT NULL

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

Logical operators to check for NULL values

A

IS NULL and IS NOT NULL logical operators must be used to select NULL values.

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

truth tables

A

The value of logical expressions containing NULL operands is defined in truth tables.

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

Why can’t you use = NULL to check for a NULL value?

A

Because = is an arithmetic operator and this needs a comparison operator

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