बदलें FLOAT(2)
केवल FLOAT
. के साथ :
CREATE OR REPLACE TYPE EmployeeType AS OBJECT (
EmployeeNumber NUMBER,
EmployeeName VARCHAR2(150),
EmployeeAddress VARCHAR2(255),
MAP MEMBER FUNCTION getEmployeeNumber RETURN NUMBER,
MEMBER FUNCTION CalculateSalary RETURN FLOAT
)
NOT FINAL;
/
CREATE OR REPLACE TYPE BODY EmployeeType AS
MAP MEMBER FUNCTION getEmployeeNumber RETURN NUMBER IS
BEGIN
RETURN EmployeeNumber;
END;
-- function that can be overriden by subtypes, make abstract
MEMBER FUNCTION CalculateSalary RETURN FLOAT IS
BEGIN
-- function returns empty, has to be overwritten by fulltimeemployee
RETURN 0.00;
END;
END;
/
CREATE TYPE
. के लिए दस्तावेज़ीकरण इसका उल्लेख नहीं है, लेकिन आप CREATE FUNCTION
से संबंधित विषय में स्पष्टीकरण पा सकते हैं। :http://docs.oracle.com/cd/ B28359_01/appdev.111/b28370/create_function.htm
रिटर्न डेटाटाइप