I have a problem when I want to identify data type for my variable "price" as object type "rsd". When I create the table it retuns SQL Exception: ORA-00902: invalid datatype
CREATE OR REPLACE TYPE "RSD" AS OBJECT (
currency number(9,2),
MEMBER FUNCTION get_currency RETURN number)
INSTANTIABLE NOT FINAL;
CREATE OR REPLACE TYPE BODY "RSD" AS
MEMBER FUNCTION get_currency RETURN number IS
BEGIN
RETURN SELF.currency;
END;
END;
CREATE TABLE bill_item(
bill_ID number,
rb number,
price rsd,
item_id number,
CONSTRAINT scpk PRIMARY KEY (bill_id));
Can you please help me?