chapter 5.3 Flashcards

1
Q

what are the 2 conditional expressions

A

case and decode

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

which conditional expression is similar to case

A

NULLIF

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

what kind of statement is case

A

ANSI/ISO 99 SQL 99 compliant statement

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

what kind of statement is decode

A

Oracle proprietary statement

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

what is the rule for data types in the case, when and else expressions

A

data types must be the same

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

syntax for case expression

A

CASE expr WHEN comparison_expr1 THEN return_expr1
ELSE else_expr

END

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

what does decode do

A

compares an expression to each of the search values

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

what is the syntax for decode

A

DECODE(column1|expression, search1, result 1
[, default1])

if the default is ommited null value is returned when search value doesnt match any of the value s

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