how to create object in plsql

Answer Posted / chandu

create type addresstype as object
(hno varchar2(5),street varchar2(10),
city varchar2(10),pin varchar2(5));

Now we use this object in creating table like this.

create table employee(empno number(5),job varchar2(10),sal
number(5),empaddress addresstype);

insert into employee
values(101,'clerk',6000,addresstype('114a','gandhi','hyd',50001));

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is cursor and its types?

548


How do you determine the current isolation level? : Transact sql

570


Mention what pl/sql package consists of?

528


What is sql keyword?

548


How do I find duplicates in a single column in sql?

524






Will truncate release space?

509


Can we use delete in merge statement?

508


how to enter binary numbers in sql statements? : Sql dba

485


how to delete duplicate rows from a join tables(I have three tables on that join) how do you know which join is need to be used? The select statement I have is: SELECT gc_skill_type.skill_type, gc_area_tec.area, gc_technology.technology, gc_technology.id_technology, gc_area_tec.id_area_tec FROM gc_skill_type, gc_area_tec, gc_technology WHERE gc_area_tec.id_skill_type (+) = gc_skill_type.id_skill_type AND gc_technology.id_area_tec (+) = gc_area_tec.id_area_tec order by gc_skill_type.skill_type asc, gc_area_tec.area asc, gc_technology.technology asc

3227


What is rank function in sql?

522


Can we insert in sql function?

533


Explain what is a subquery ?

648


Why are indexes and views important to an organization?

520


What is cursor and why it is required?

546


what are the differences between char and varchar? : Sql dba

517