0
Create Or Replace Function  ASS1_TEST_MSG (pName varchar2) Return varchar2 As
vMsg := '';
Begin
    If pName = 'Peter' Then
        vMsg := 'Hello Peter. I am a student in Database Systems.';
    End If;
    Return vMsg;
End;
4

1 回答 1

3

您需要声明的数据类型vMsg

尝试这个:

CREATE OR REPLACE
FUNCTION ASS1_TEST_MSG(
          pName VARCHAR2)
     RETURN VARCHAR2
AS
     vMsg varchar2(100):= '';
BEGIN
     IF pName   = 'Peter' THEN
          vMsg := 'Hello Peter. I am a student in Database Systems.';
     END IF;
     RETURN vMsg;
END;
于 2013-09-11T04:16:33.263 回答