我在返回VARCHAR(4)旁边不断收到错误消息 [英] I keep getting an error next to the return VARCHAR(4)
本文介绍了我在返回VARCHAR(4)旁边不断收到错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
VARCHAR2和THE(4)之间似乎有语法错误.
ERROR IS BETWEEN THE VARCHAR2 AND THE (4) seems to be a syntax error.
创建或替换
FUNCTION Employee_exists
(p_employee_id IN NUMBER)
RETURN VARCHAR2(4);
AS
BEGIN
SELECT employee_id
FROM employees
WHERE employee_id = p_employee_id;
RETURN 'true';
END Employee_exists;
推荐答案
实际上有两个错误:
- 您不能在函数或过程规范中指定返回类型的长度
-
;
是语句终止符,因此它在返回类型和AS
之间没有位置.
- You can't specify the length of the return type in a function or procedure specification
;
is a statement terminator, as such it has no place between the return type andAS
您的第一行应该是:
FUNCTION employee_exists
(p_employee_id IN NUMBER)
RETURN VARCHAR2 AS
这篇关于我在返回VARCHAR(4)旁边不断收到错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文