SELECT
CASE FLOOR_LINE_ID
WHEN 1
THEN '高铁'
WHEN 2
THEN '高速'
WHEN 3
THEN '公路'
WHEN 5
THEN '地铁'
ELSE '其他'
END AS LINE_NAME,
FLOOR_LINE_ID
FROM
( SELECT FLOOR(LINE_ID/100) AS FLOOR_LINE_ID FROM DT4_LINE_NAME
)
改为
SELECT LINE_ID,DECODE(FLOOR(LINE_ID/100),1,'高铁',2,'高速',3,'公路',5,'地铁',6,'公交') AS LINE_NAME FROM DT4_LINE_NAME
原文链接:https://www.f2er.com/oracle/208188.html