标签:blog http sp div 2014 问题 log bs as
1.一个表,三个字段A,B,C,现在要求如果A字段比B大,返回A,否则返回B
如果B字段比C大,返回B,否则返回C。写出SQL
SELECT CASE WHEN a>b THEN a ELSE b END a1, CASE WHEN b>c THEN b ELSE c END a2 FROM test;
标签:blog http sp div 2014 问题 log bs as
原文地址:http://www.cnblogs.com/baby-bear/p/4055189.html