首页 > 解决方案 > ORA-00911: 无效字符 ??///

问题描述

我正在尝试执行此查询,但我得到 ORA-00911: invalid character

SELECT e.empno AS “Employee ID”, e.ename AS “Employee Name”, d.deptno AS “Dept No”, 
d.dname AS “Dept Name”, d.loc AS “Dept Location” FROM emp e, dept d WHERE e.deptno = d.deptno AND e.deptno = 10;

标签: sqloracleapex

解决方案


SELECT e.empno AS "Employee ID", 
e.ename AS "Employee Name",
d.deptno AS "Dept No", 
d.dname AS "Dept Name", 
d.loc AS "Dept Location" 
FROM emp e, dept d WHERE e.deptno = d.deptno AND (e.deptno = 10);

你的双引号是错误的。更改引号。

只是说它与 error 关键字无关AS是可选的,您可以像这样编写列别名

e.ename "Employee Name"

在我看来,它也是可读的,但是是的,取决于个人的选择。


推荐阅读