Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Is sql injection illegal?

982


What do you think about pl/sql?

973


What is the difference between having and a where in sql?

1055


What is the usage of sql functions?

1101


How to get list of all tables from a database?

1125


what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba

999


Why primary key is required?

965


Why do we use %rowtype & %type in plsql?

1007


How to avoid using cursors? What to use instead of cursor and in what cases to do so?

1148


How can we link a sql database to an existing android app?

1002


Explain cursor types?

974


how to calculate the difference between two dates? : Sql dba

1021


Can a varchar be a primary key?

970


Can we insert data into materialized view?

909


How do you delete a table?

1033