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

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -