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 the difference between the implicit and explicit cursors?

0 Answers  


What does bitemporal mean?

0 Answers  


Write a unique difference between a function and a stored procedure.

0 Answers  


i have a table emp and columns ename,empno,mgr_id,i need ename,manager name as result i.e employee respective manager.. example empno ename mgr_id 1 john 3 2 paul 3 3 smith 1 4 kevin 1 5 stewart 2 result has to look like this ename manager john smith paul smith smith john kevin john stewart paul can u plz help me out in this.....

8 Answers  


How does sql profiler work?

0 Answers  


Is pl sql and postgresql same?

0 Answers  


Hi All, I am new to both this blog and technology. I was able to see a response for one of the questions on triggers as below. I would like to know why are we using " if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then" instead, can't we use " if sysdate = 'sunday' then". I can understand the use of "rtrim", but dont know y v r using to_char. I have seen this in many cases but did not get a convincible explaination. Please help me with this and do excuse if this question sounds silly. Thanks in advance...... create or replace trigger trg_sun before insert on <table name> begin if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then raise_application_error(-20345,'no transaction in sunday'); end if; end trg_sun;

2 Answers  


What is secondary key?

0 Answers  


What is sequence in sql?

0 Answers  


Is pl sql a scripting language?

0 Answers  


What is the usage of when clause in trigger?

0 Answers  


How to look at the current sql*plus system settings?

0 Answers  


Categories