我在 PL/SQL 中编译简单的一段代码时遇到问题。代码如下:
DECLARE
zm VARCHAR(20);
BEGIN
SELECT TEA_FIRST_NAME into zm
from students join teachers on STU_TEA_ID = TEA_ID
where STU_ID = (select k.STU_ID from students k where k.STU_FIRST_NAME =
:BLOCK9.TEXT_ITEM11);
END;
当我尝试编译它时,我看到了那个错误:
但是,当我在 SQL Navigator 中运行这段代码时:
SELECT TEA_FIRST_NAME
from students join teachers on STU_TEA_ID = TEA_ID
where STU_ID = (select k.STU_ID from students k where k.STU_FIRST_NAME =
'Lukasz');
它运行良好并返回一条记录。怎么了?
我正在使用 Oracle Forms 10g (10.1.2.3.0) PL/SQL (10.1.0.5.0)。数据库版本 11.2.0.3.0