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

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -