我在oracle application express中遇到这个简单查询时遇到了麻烦,我收到了这个错误:
无法解析查询,请检查查询的语法。 (ORA-06502:PL / SQL:数字或值错误:字符串缓冲区 太小了)“
SELECT E.EQUIPMENTID, E.EQUIPMENTDESCRIPTION
From EQUIPMENT as E
left outer join EQUIPMENT_CHECKOUT as EC
on E.EQUIPMENTID = EC.EQUIPMENTID
WHERE EC.EQUIPMENTID is null
答案 0 :(得分:1)
我认为在这种情况下错误可能会产生误导。在指定表别名时不包括AS
,即:
SELECT E.EQUIPMENTID, E.EQUIPMENTDESCRIPTION
From EQUIPMENT E
left outer join EQUIPMENT_CHECKOUT EC
on E.EQUIPMENTID = EC.EQUIPMENTID
WHERE EC.EQUIPMENTID is null
BTW:在Apex中,您可以在SQL命令窗口(在SQL Workshop中)中尝试SQL语句,这通常会提供更好的语法错误信息。