4 SQL CASE Statement Flashcards

1
Q

CASE

A

we will write condtitio in the column section

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

eg of case

A

select case : when conition then ‘ message’ end

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

else in case

A

if all case condition are not right then this else part will execute.

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

is end manditory

A

yes

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

Transposing

A

making horizontal table to vertical table

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

syntax of transpose

A

select sum (case when condn then 1 else 0 end )

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