question

sqlstarter avatar image
sqlstarter asked

Type created with compilation error. Why?

I input this and got that it has compilation error, but don't understand.

CREATE TYPE contact_info AS OBJECT ( cid number(3,0) primary key, Company_Name varchar2(250), Address varchar2 (300), Phone varchar2 (20), Fax varchar2 (20), Website varchar2 (100), MEMBER FUNCTION phys_contact_info (x contact_info) RETURN varchar(500), MEMBER FUNCTION e_contact_info (x contact_info) RETURN varchar(500), );

CREATE TYPE BODY contact_info AS MEMBER FUNCTION phys_contact_info (x contact_info) RETURN varchar(500) IS BEGIN RETURN varchar(x.Company_Name + x.Address) END phys_contact info;

MEMBER FUNCTION e_contact_info (x contact_info) RETURN varchar(500) IS BEGIN RETURN varchar(x.Company_Name + x.Phone + x.Fax + x.Website)
END e_contact_info; END; /

errors
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.