sql - Retrieve and insert into type objects in oracle -
i have created object type(address-city,state) in oracle 10g .then table cust_contact contains field of type address.can please provide sql query insert , retrieve values table including type?
selection easy. include type column in query projection. assuming address column called contact_address:
select id, contact_name, contact_address cust_contact /
with inserts need specify type in statement:
insert cust_contact values (some_seq.nextval , 'mr knox' , address(34, 'main street', 'whoville', 'su') ) /
Comments
Post a Comment