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
Is sql injection illegal?
What do you think about pl/sql?
What is the difference between having and a where in sql?
What is the usage of sql functions?
How to get list of all tables from a database?
what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba
Why primary key is required?
Why do we use %rowtype & %type in plsql?
How to avoid using cursors? What to use instead of cursor and in what cases to do so?
How can we link a sql database to an existing android app?
Explain cursor types?
how to calculate the difference between two dates? : Sql dba
Can a varchar be a primary key?
Can we insert data into materialized view?
How do you delete a table?