积分表result中有A B C D四列,要求:1)当A列值大于等于B列时,选择A列否则选择B列 2)当C列值大于等于D列时,选择C列否则选择D列
用SQL语句实现正确的是:( )
A. select ( when A>=B then A else B ) MAX_AB,( when C>=D then C else D ) MAX_CD from result;
B. select (case when A>=B then A else B ) MAX_AB,(case when C>=D then C else D ) MAX_CD from result;
C. select (case when A>=B then A else B end) MAX_AB,(case when C>=D then C else D end) MAX_CD from result;
D. select (case A>=B then A else B end) MAX_AB,(case C>=D then C else D end) MAX_CD from result;
题目来源于CDA模拟题库