SQL> create table t_a(a int);
Table created
SQL> select a as 成功/失败 from t_a;--因别名包含/引发错误
select a as 成功/失败 from t_a
ORA-00923: FROM keyword not found where expected
SQL> select a as '成功/失败' from t_a;--对别名添加单引号失败
select a as '成功/失败' from t_a
ORA-00923: FROM keyword not found where expected
SQL> select a as "成功/失败" from t_a;--添加双引号即可
成功/失败
---------------------------------------
小结:1,最好在列别名不用要汉字,兼容太差
2,不要在列别名中使用特殊字符如:/
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-754969/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9240380/viewspace-754969/