Oracle ORA-00923: FROM keyword not found where expected

时间:2019-12-03 02:28:04   收藏:0   阅读:140

不同于 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;

原文:https://www.cnblogs.com/niceyoo/p/11973958.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!