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

Answers were Sorted based on User's Feedback



how to create object in plsql..

Answer / madhavi

SQL> set serverout on
SQL>
SQL> create or replace
2 type new_person as object (
3 last_name varchar2(100),
4 phone varchar2(100),
5 member function get_last_name return varchar2,
6 member function get_phone_number return varchar2 )
7 not final
8 /

Type created.

Is This Answer Correct ?    11 Yes 0 No

how to create object in plsql..

Answer / 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

how to create object in plsql..

Answer / purushottam mishra

by using dynamic sql

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More SQL PLSQL Interview Questions

What is materialised View?

2 Answers   IBM,


What is indexing in sql and its types?

0 Answers  


Explain the components of sql?

0 Answers  


What is the maximum number of rows in sql table?

0 Answers  


How many types of relationship are there?

0 Answers  


Compare sql & pl/sql

0 Answers  


Does mysql support pl sql?

0 Answers  


What is coalesce in sql?

0 Answers  


How to add Foreign key in a table after the creation of the table?

5 Answers   Satyam,


What is materialized view in sql?

0 Answers  


How do I filter in sql profiler?

0 Answers  


how to check the 3rd max salary from an employee table?

23 Answers   IBM,


Categories