查询书的价格10到20 之前显示10to20 没有显示unknown
CREATE TABLE book(
price INT,NAME VARCHAR(20))SELECT NAME AS '名字',price,(CASE WHEN price>=10 AND price<=20 THEN '10 to 20' ELSE 'unknow' END)AS '结果'
FROM book
本文共 250 字,大约阅读时间需要 1 分钟。
查询书的价格10到20 之前显示10to20 没有显示unknown
CREATE TABLE book(
price INT,NAME VARCHAR(20))SELECT NAME AS '名字',price,(CASE WHEN price>=10 AND price<=20 THEN '10 to 20' ELSE 'unknow' END)AS '结果'
FROM book
转载于:https://www.cnblogs.com/hello-liyb/p/7764573.html