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 a clob in sql?

568


What is sql select statement?

505


What is rtm stands for?

583


Mention what pl/sql package consists of?

539


What are the different operators available in sql?

576






can a stored procedure call itself or recursive stored procedure? : Sql dba

579


What are different types of tables in sql?

531


What is percent sign in sql?

718


what is the command line end user interface - mysql? : Sql dba

505


How do I write a sql query in pgadmin 4?

558


How many sql core licenses do I need?

509


How do I use google cloud in sql?

542


What is an ndf file?

534


Is oracle and sql same?

575


a table has 2 classifications 1)liabilities 2)earnings this liabitity has 2 elements with 2 input values and the earnings have 2 elements with 2 input values i wrote a query so that my input is liability savings amount1 amount2 xxxx null xxxxxx 0 xxx1 null xxxxx1 0 null yyyy 0 yyyy null yyy1 0 yyy1 my problem is --when i developed a report(d2k) with this data my o/p is liabilities,amount1,savings,amount2 xxxx xxxxxx xxx1 xxxxx1 yyyy yyyy yyy1 yyy1 how could i move this savings,savings values 2 palces up. can any body provide me witha better solution

1778