嗨,当我尝试编译下面的过程时,我总是收到错误它在我替换
TYPE NameCombine IS RECORD(FIRST_NAME employees.FIRST_NAME%TYPE, LAST_NAME employees.LAST_NAME%TYPE, Combined_NAME employees.LAST_NAME%TYPE);
并first_name employees.first_name%TYPE;
在where rownum=1
select 语句中使用时有效,但记录方式似乎对我不起作用我在这里做错了什么?
CREATE OR REPLACE PROCEDURE Combined_name
IS
TYPE NameCombine IS RECORD(FIRST_NAME employees.FIRST_NAME%TYPE, LAST_NAME
employees.LAST_NAME%TYPE, Combined_NAME employees.LAST_NAME%TYPE);
BEGIN
SELECT
emp.FIRST_NAME,
emp.LAST_NAME,
emp.FIRST_NAME +' '+ emp.LAST_NAME
INTO
NameCombine.FIRST_NAME,
NameCombine.LAST_NAME,
NameCombine.Combined_NAME
FROM
EMPLOYEES emp;
dbms_output.put_line( NameCombine.FIRST_NAME );
END;
与上述语法示例类似的网站:http: //plsql-tutorial.com/plsql-records.htm
错误
Error(7,1): PL/SQL: SQL Statement ignored
Error(12,2): PLS-00330: invalid use of type name or subtype name
Error(14,34): PL/SQL: ORA-00904: : invalid identifier
Error(17,1): PL/SQL: Statement ignored
Error(17,23): PLS-00330: invalid use of type name or subtype name
预先感谢您的反馈。