ORA-00904: "Good Resort": 无效标识符

0 sql oracle case ora-00904

我创建了以下选择查询来显示基于 if then else 使用的数据 CASE-WHEN-THEN

select id,name,
    case
     when rating between 4.0 and 5 then "very good"
     when rating between 3.0 and 3.5 the "good"
    else "Good Resort"
    end as comment
from resort
order by id;
Run Code Online (Sandbox Code Playgroud)

执行时它给出了这个

错误

ORA-00904 : "Good Resort": 无效标识符

zip*_*zip 5

使用单引号。双引号被解释为一个字段:

select id,name,
    case
     when rating between 4.0 and 5 then 'very good'
     when rating between 3.0 and 3.5 then 'good'
    else 'Good Resort'
    end as comment
from resort
order by id;
Run Code Online (Sandbox Code Playgroud)