錯誤的語法,請參見下面
正確的語法是
CREATE OR REPLACE FUNCTION generate_code
return varchar2
AS
code varchar2(100);
BEGIN
code := DBMS_RANDOM.value(1,100);
return code;
END;
原始語法錯誤描述:
SQL> CREATE OR REPLACE FUNCTION generate_code()
2
3 return varchar2
4 AS
5 code varchar2;
6 BEGIN
7 code := DBMS_RANDOM.value(1,100);
8 return code;
9 END;
10
11/
Warning: Function created with compilation errors.
SQL> show error
Errors for FUNCTION GENERATE_CODE:
LINE/COL ERROR
-------- -----------------------------------------------------------------
1/24 PLS-00103: Encountered the symbol ")" when expecting one of the
following:
<an identifier> <a double-quoted delimited-identifier>
current delete exists prior
來源
2016-12-07 12:01:23
are
你先生是了不起的!謝謝,我的問題解決了。 –