Oracle ORA-00923: FROM keyword not found where expected

不同于 MySQL,请检查 from 之前显示的字段,尤其是 AS 命名符号的引用。

Oracle 中单引 AS 'XXX’ 是错误的,需要修改为双引 "XXX" 或者是干脆去掉 ''

错误写法:
select t.user_name as 'name' from user t;
正确写法:
select t.user_name as "name" from user t;

select t.user_name as name from user t;

猜你喜欢

转载自www.cnblogs.com/niceyoo/p/11973958.html