You are on page 1of 392

Sort by:

Answers
|
Date
Jump to Page:
1

JAN

152016

07:09 AM

583
Views
3
Ans

Dual Table
o

RAJAT RAHUL

PL/SQL Interview Questions

Is Dual Table updatable? If we update, will it impact the health of the database?
Anshul Nagar

o
Feb 3rd, 2016
We cannot update it, a dual table is a dummy table with one row and any no. of columns.
sujata

o
Jan 19th, 2016
No we cannot update dual table. It is in-built table with one row and one column.
Answer Question

DEC

09:32 AM

Select Best Answer

312009

4838
Views
2
Ans

SQL Optimization
o

kunalpurbey

PL/SQL Interview Questions

How to optimize SQL Statements?


Sudhir Kumar

o
Jan 20th, 2016
Try to make use of mqts or temporary tables if possible ..try to transfer the conditions from non key
columns to key columns
ace1234567

o
Mar 4th, 2015
update the statistics of all the tables used in the query. Check the explain plan. Check whether query
is using the existing indexes. If required add/modify new indexes. Check for the sequence of cond...
Answer Question

OCT

Select Best Answer

172006

03:30 AM

30074
Views
10
Ans

What is pragma autonomous transaction? Plz can u let me know


it in a simple understandable way.Thanks in advance.Byee

raj

PL/SQL Interview Questions

sujata

o
Jan 19th, 2016
Pragma AUTONOMOUS_TRANSACTION instructs the compiler to treat the PL/SQL block
following the pragma as autonomous (independent) from the calling transaction. Pragma can be
applied on:- 1) Anonymous PL...
kitti

o
Dec 19th, 2015
An autonomous transaction is an independent transaction initiated by other transaction -When an
autonomous transaction is called the parent transaction is currently suspended. -We can commit or
rollba...
Answer Question

FEB

Select Best Answer

092007

08:23 PM

7215
Views
4
Ans

What is the difference between stand alone procedures and


stored procedures?
o

madhuk17

PL/SQL Interview Questions

Praveen kumar

o
Both are same
Naresh Bandla

Jan 8th, 2016

o
Dec 1st, 2015
Stand Alone Procedure: A procedure which is not enclosed in a package is called Stand Alone
Procedure.
Stored Procedure: A Procedure which is defined in Package is called Stored Procedure and if we
want to call that procedure out of package is to use .

Answer Question

DEC

Select Best Answer

202006

06:13 AM

12502
Views
9
Ans

What is materialized view?


o

Mrigen

PL/SQL Interview Questions

sachin rasal

o
Dec 11th, 2015
Materialised view - A table on a disk that contains the result set of a query
Non-materiased view - A query that pulls data from the underlying table
Sathish

o
Jun 12th, 2012
Materialized views are objects that are used in base table that can be Summarized Group, and
aggregated with the base table.This materialized views are used in data-ware housing and decision
support system.
Answer Question

Select Best Answer

022005

SEP

06:41 AM

190494
Views
41
Ans

What is difference between a PROCEDURE & FUNCTION ?


o
o

PL/SQL Interview Questions

A FUNCTION is always returns a value using the return statement.


return one or more values through parameters or may not return at all.

A PROCEDURE may

Read Best Answer

Editorial / Best Answer


krishnaindia2007

Member Since Sep-2007 | May 3rd, 2008

1. Function is mainly used in the case where it must return a value. Where as a procedure may or
may not return a value or may return more than one value using the OUT parameter.

2. Function can be called from SQL statements where as procedure can not be called from the sql
statements
3. Functions are normally used for computations where as procedures are normally used for
executing business logic.
4. You can have DML (insert,update, delete) statements in a function. But, you cannot call such a
function in a SQL query.
5. Function returns 1 value only. Procedure can return multiple values (max 1024).
6.Stored Procedure: supports deferred name resolution. Example while writing a stored procedure
that uses table named tabl1 and tabl2 etc..but actually not exists in database is allowed only in during
creation but runtime throws error Function wont support deferred name resolution.
7.Stored procedure returns always integer value by default zero. where as function return type could

be scalar or table or table values


8. Stored procedure is precompiled execution plan where as functions are not.

9.A procedure may modify an object where a function can only return a value The RETURN
statement immediately completes the execution of a subprogram and returns control to the caller.
Giri

o
Dec 2nd, 2015
DML statement can be used in function also.
Shalini

o
Jul 23rd, 2014
function can be called from trigger. 1.CREATE OR REPLACE TRIGGER emp_trig 2. before
INSERT ON emp 3. FOR each row 4.--referencing old as old and new as new 5.declare 6. i
pls_integer; 7.begi...
Improve Answer

132015

MAY

03:27 AM

6193
Views
6
Ans

Load excel data into oracle database


o

Mayur

PL/SQL Interview Questions

1. How to load excel data into oracle database by using sql loader?
2. What are the ways to load data from excel file in oracle database ?
Naresh Bandla

o
Dec 1st, 2015
You can upload the Excel file into tables by many approaches, I will explain here in two methods. 1.
Loading data using Loader programs: Convert your excel file into CSV file and create control as pe...

ashay

o
Nov 13th, 2015
Best and most easy way is to use an external table. Keep the file in designated location and file will
automatically loaded into table every time you put a new file or update the file. Create trigger on the
given table to load the data into respective tables.
Answer Question

AUG

Select Best Answer

192010

11:36 AM

10113
Views
11
Ans

Drop Vs Truncate
o

kalabaggam

PL/SQL Interview Questions

Which is faster, Drop or Truncate? Explain


anjaneulu

o
Nov 26th, 2015
TRUNCATE means it deletes the table data but the table structure remains as it is. Whereas in DROP
command it deletes the table data as well as its structure also.
subbarao

o
Nov 6th, 2015
I have one doubt which is one is faster some people said comp with drop truncate very faster but
some one drop very faster comp with truncate.
Answer Question

DEC

Select Best Answer

012006

02:31 AM

36572
Views
13
Ans

What is mutating trigger? How do you resolve it?If a trigger body


is trying to update dependent tables, will it get a mutating error?
o

be17be

PL/SQL Interview Questions

Lokesh

o
Nov 18th, 2015
A mutating table is a table that is being modified by an UPDATE, DELETE, or INSERT statement.
The session that issued the triggering statement cannot query or modify a mutating table. If you must
up...
maxin john

o
Jun 8th, 2015
Soo...... how you are going to use that lelel trigger :O
Answer Question

OCT

Select Best Answer

062012

12:56 PM

6638
Views
3
Ans

Bulk binding
o

sidd_130

PL/SQL Interview Questions

What are the advantages of bulk binding in PL/SQL?


sachin rasal

o
Nov 12th, 2015
A new feature called "bulk binds" was added to PL/SQL back in Oracle 8i . Bulk binds enable a
PL/SQL program to fetch many rows from a cursor in one call instead of fetching one row at a time.
Bulk bin...
amala

o
Jun 24th, 2015
It retreives multiple rows with a single fetch...It increases the performance by reducing no.of context
switches
Answer Question

FEB

Select Best Answer

072006

06:21 AM

47055
Views
12
Ans

What is cursor? Explain the types of cursor and write one implicit
cursor program to check how many records deleted from table?
o

indranil

PL/SQL Interview Questions

gagan

o
Nov 9th, 2015
Oracle uses the work area for its internal processing in order to execute a SQL statement is known as
a cursor.

shivigupta

o
Oct 4th, 2012
Set serveroutput on;
begin
delete from employ where empid = 1;
commit;
dbms_output.put_line(NO of records deleted||sql%rowcount);
end;
Answer Question

MAR

Select Best Answer

072015

03:58 AM

5092
Views
4
Ans

How do you change oracle default system date like mon-dd-yyyy


o

Nagendar

PL/SQL Interview Questions

Ram Devineni

o
Nov 3rd, 2015
Alter session set nls_date_format=mon-dd-yyyy hh:mi:ss
/
Purvesh Khanna

o
May 5th, 2015
If you are using sql developer then go to Tools ->> Preference ->> Database ->> NLS -->> Date
Format.
Send the format as you want.
Answer Question

Select Best Answer

MAR

082006

05:09 AM

10004
Views
15
Ans

How many number of triggers can be created on a table?


o

vivek

PL/SQL Interview Questions

Ram

o
Oct 29th, 2015
You can create n number of triggers on a table but maximum types of triggers you can create are 12.
Ratnesh gupta

o
Apr 2nd, 2015
There is no technical limit on the number of triggers you define (or, at least, not one that any rational
person has ever hit). It generally wouldnt make sense to have more than one trigger of a given...
Answer Question

NOV

Select Best Answer

072005

02:01 AM

8408
Views
13
Ans

What is meant by DBMS_OUTPUT.PUT_LINE


o

maheshwari

PL/SQL Interview Questions

hardeep singh

o
Oct 16th, 2015
The (dbms_output) is library and the (put_line) is the function declared inside library
aravinthancse

o
Dec 27th, 2011
DBMS_OUTPUT - is a Oracle supplied package. put_line() is a DBMS_OUTPUT packages inbuilt
procedure. put_line() is a combination of two inbuilt procedures such as put() and new_line().
procedure put()...
Answer Question

NOV

Select Best Answer

052006

01:11 AM

7488
Views
11
Ans

What is difference in defining constraints at table level and


column level What is main purpose of making constraints at table
level....pls ans me
o

basukolur014

PL/SQL Interview Questions

Saurabh Singh

Oct 12th, 2015

Table level constraints are defined for compound constraints like primary key involving more than
one col and have the flexibility to provide user defined names to these which is not possible in case
of col level constraints. Only NOTNULL constraints cant be defined as table level.
krishna mistry

o
Oct 10th, 2015
No difference in column level and table level constraints.
Answer Question

Select Best Answer

052008

SEP

05:46 AM

4011
Views
3
Ans

Load Tab Delimited Data


o

ramesh.akula9

PL/SQL Interview Questions

How to load tab delimited data using SQL*Loader?


bhargavi

o
Oct 3rd, 2015
For Tab delimiter You can use 0x 09
gaurav

o
Sep 26th, 2015
Fields Terminated by X09 use this
Answer Question

DEC

Select Best Answer

082014

06:46 AM

6601
Views
4
Ans

Trigger - insert into one table update into another table


o

Revathi

PL/SQL Interview Questions

If i insert record in table A and these record should update in table B by using Trigger.How to
achieve this.
Trigger - insert into one table update into another table
Nagendra

o
Sep 10th, 2015
"sql CREATE TRIGGER update_trigger ON CUSTOMER_info FOR update AS BEGIN IF
UPDATE (cust_name) OR UPDATE (contact) BEGIN INSERT INTO update_log ( cus...
Avinash

o
Aug 10th, 2015
We can use instead of trigger in this case
Answer Question

APR

Select Best Answer

262006

12:38 AM

22159
Views
12
Ans

Types of Triggers in Oracle


o

GIRISH H.R.

PL/SQL Interview Questions

sai balaji

o
Sep 8th, 2015
Basically we have 13 types of triggers. 1.Row level triggers (6 types) 2.Statement level triggers (6
types) 3.Instead of trigger Row Level Triggers: before insert on each row before update on each r...
mahamadalig

o
Apr 17th, 2012
Before trigger
after trigger
row level trigger
statement level trigger
Answer Question

AUG

Select Best Answer

112015

01:28 PM

3120
Views
1
Ans

PL/SQL Triggers
o

wajid

PL/SQL Interview Questions

How many types of PL/SQL Triggers are there? What are they?
sravanthi

Aug 13th, 2015

There are two different types of triggers: - Application Triggers - Database Triggers An application
trigger fires whenever an event occurs within a particular application. A database trigger fire...

Answer Question

AUG

Select Best Answer

062015

08:27 AM

2993
Views
1
Ans

How to tune package, how can we see the output, which logic
taking more time to execute?
o

SHikha

PL/SQL Interview Questions

Anjani Kumar

o
Aug 9th, 2015
We can use oracle supplied package DBMS_HPROF(New in 11g) to see which procedure and inside
that which sql is taking taking more time to execute.DBMS_HPROF Package profiles subprogram
calls also with ...
Answer Question

Select Best Answer

Sort by:
Answers
|
Date
Jump to Page:
2

OCT

192005

02:51 AM

13873
Views
22
Ans

Can we use commit or rollback command in the exception part of


PL/SQL block?
o

sadik

PL/SQL Interview Questions

Read Best Answer

Editorial / Best Answer


Answered by: answertoyourquery
o

Nov 9th, 2005

Yes, we can use the TCL commands(commit/rollback) in the exception block of a stored
procedure/function. The code in this part of the program gets executed like those in the body without
any restriction. You can include any business functionality whenever a condition in main block(body
of a proc/func) fails and requires a follow-thru process to terminate the execution gracefully!
Leena Roja

o
Jul 13th, 2015
Correct Subhash..
Susil Kumar Nagarajan

o
Jan 20th, 2012
Yes. You can very well use COMMIT or ROLLBACK in exception block. But it is not a good idea to
use, as it will commit the previous transactions in the same PLSQL block. Make use of creating
SAVEPOINTS and commiting them when required.
Improve Answer

JUL

272009

02:06 AM

24241
Views
6
Ans

Cursor Advantages and Disadvantages


o

sri3241

PL/SQL Interview Questions

What are the uses of Cursor?


What are its advantage and disadvantage?
Maneesh Kanaujia

o
Jun 26th, 2015
Best way to define disadvantage of cursor is context switching, if the execution switches from
PLSQL engine to SQL engine and vise versa, then execution time will increase and finally end up
with longer time to complete the whole process.
Manoj Singh

o
Jun 25th, 2015
Strongely Suggested aviod to use cursor becuase it is very slow, if you have good knowledge of joins
you can replace cursor with join
Answer Question

NOV

Select Best Answer

212011

12:33 AM

12279
Views
5
Ans

What is Simple Cursor? and What is Parametrized cursor?


o

sateeshkonthala

PL/SQL Interview Questions

Explain what is Simple Cursor and What is Parameterized Cursor? And Difference between
both??
amala

o
Jun 25th, 2015
Cursor is a private SQL area which is used to retrieve multiple rows from one or more tables. The
cursor which uses parameter is called parameterised cursor. Based on the given parameter value
the cursor will execute.
abinay

o
Oct 5th, 2012
Cursors having some private area.which is used for store the data from sql statements.Normal cursors
we don't have use any parameters.but parametrized cursors are used the parameters,which is executed
based upon the parameter.
Answer Question

MAR

Select Best Answer

252007

11:49 PM

41520
Views
27
Ans

How can we avoid duplicate rows. without using distinct


command
o

subbaraovangalli

PL/SQL Interview Questions

Malyadri M

Jun 22nd, 2015

Code
o

SELECT ROWID,

E.*

FROM

WHERE ROWID = ( SELECT MAX(ROWID)

EMP E

FROM

EMP1 E1

WHERE

E.ENO

E1.ENO

);

Rashid

o
Here It is:

Jun 21st, 2015

Code
o

SELECT * FROM

tablename a
a.ROWID

WHERE

>

ANY

(SELECT

b.ROWID

FROM

WHERE

AND

Answer Question
2.

tablename b
a.fieldname

a.fieldname2

Select Best Answer

DEC

202006

06:12 AM

11459
Views
3
Ans

b.fieldname
=

b.fieldname2)

What is Atomic transaction?


o

Mrigen

PL/SQL Interview Questions

igornem

o
Jun 6th, 2015
There is no term "Atomic transaction". There is term "Transaction" which is must have ACID
properties, and first "A" in "ACID" is - "Atomicity", which is defines that series of operations
included in ...
madhaviguthula

o
Feb 28th, 2007
Autonomous transactions are independent transactions that can be called from within another
transaction. An autonomous transaction lets you leave the context of the calling transaction, perform
some S...
Answer Question

Select Best Answer

192015

MAY

02:42 AM

2703
Views
2
Ans

Define a RETURN statement


o

Sasmita

PL/SQL Interview Questions

Is it possible to define a RETURN statement in the exception part of a function?


Explain it with example.
Aryan

May 26th, 2015

Yes it is possible to use Return in exception block of pl/sql. Example: "oracle8 CREATE OR
REPLACE FUNCTION [(input/output variable declarations)] RETURN return_type [AUTHID ...
Kamal

o
May 23rd, 2015
Yes, you can return from exception block. example: create or replace function TestReturn return
varchar2 is Result varchar2(1);--size 1 begin Result := 123;--size 3 return Test; except...
Answer Question

Select Best Answer

052015

MAY

07:33 AM

1272
Views
0
Ans

How to dump REST webservice data into Oracle 11g


o

Suparna

PL/SQL Interview Questions

Answer Question

092004

SEP

06:04 AM

23197
Views
13
Ans

What is difference between % ROWTYPE and TYPE RECORD ?


o
o

PL/SQL Interview Questions

% ROWTYPE is to be used whenever query returns a entire row of a table or view. TYPE rec
RECORD is to be used whenever query returns columns of differenttable or views and
variables.
E.g. TYPE r_emp is RECORD (eno emp.empno% type,ename emp ename
%type); e_rec emp% ROWTYPE cursor...
Nupur

o
Apr 30th, 2015
This is my understanding: Declare : eno employee.emp_id%type - specifically tells you that the
variable type or data that it will be holding will be same as th e employee_id type in the employee
tabl...
Nupur

o
Apr 24th, 2015
When we declare a var as %row type, then the variable holds all the column type attributes.
Developer does not need to know what the individual column types are. Type record is used when we
declare a variable to be of the records of the table.
Answer Question
o

Select Best Answer

APR

192012

06:27 AM

9071
Views
7
Ans

How to get 1st date of a month ?


o

dinaballavsahoo

PL/SQL Interview Questions

During preparation of report in *.RDF , there are two things on date & to date
on date is the i/p value , but to date = 1st day of this month on date
how ?
pradeep

o
Apr 24th, 2015
SELECT TRUNC(SYSDATE,MM) FROM DUAL
Praveen

o
Apr 22nd, 2015
SELECT ADD_MONTHS(LAST_DAY(SYSDATE),-1)+1 FROM DUAL;
Answer Question

Select Best Answer

202012

SEP

08:15 AM

10526
Views
5
Ans

Stored Procedure Vs Function


o

priyanka_sharma

PL/SQL Interview Questions

What is the impact of using a stored proc or a function on the performance? Which has a better
performance? Also, why is it not possible to use DML in the functions called from a select
query?
Nupur

o
Apr 24th, 2015
Functions and procedures are both named blocks of statement . A function must return a value .
Performance wise if you want the program to return a single value use a function . You can use
out par...

Suchith Shivali

o
Apr 17th, 2015
1)In stored procedure you may or may not return value but in the function return is compulsory. 2)If
you want to return more than one value go for Stored procedure. 3)Once SP or function is created,...
Answer Question
o

Select Best Answer

NOV

212012

02:32 AM

5466
Views
2
Ans

If we call oracle package inside another package


o

santosh.rdg

PL/SQL Interview Questions

We have a oracle package that package is calling in user defined package ?from this user
defined package how will u debug the oracle package?
ChandraSekhar thimmapthruni

o
Apr 15th, 2015
Use DBMS_UTILITY.FORMAT_ERROR_BACKTRACE
Rohit

o
Jan 6th, 2013
Using trace_on utility
eg:- For HRMS hr_utility.trace_on ;
expression(here call the package which you want to debug);
HRMS hr_utility.trace_off;

Answer Question

Select Best Answer

MAR

052015

01:21 AM

3795
Views
2
Ans

Triggering events in oracle


o

Srividhya

PL/SQL Interview Questions

A table has both before insert and after insert trigger. Also we have declared both the trigger as
pragma autonomous transaction for saving the error record alone in the error table if any
exception occurs. Now if we have a error in the trigger will the before insert trigger will get
executed and the error data will be stored in the error table?. what is the exact use of before and
after insert trigger...
DInesh Shukla

o
Apr 15th, 2015
As we declared pragma here. It will insert the record in error table if got fail during execution.
sukrathik

o
Mar 6th, 2015
If an autonomous transaction attempts to access a resource held by the main transaction, a deadlock
can occur. Oracle raises an exception in the autonomous transaction, which is rolled back if the exc...
Answer Question
o

Select Best Answer

JAN

112007

04:42 PM

12653
Views

5
Ans

Can we create a table by using a procedure or a function?


o

sarada

PL/SQL Interview Questions

Abhijit Musale

o
Mar 23rd, 2015
We can create a table in procedure by executing a string statement using EXECUTE IMMEDIATE or
using DBMS_SQL.EXECUTE.
veera

o
Nov 25th, 2013
It is possible by using Dynamic SQL.
By using EXECUTE IMMEDIATE.
Answer Question
o

Select Best Answer

NOV

092010

01:24 PM

4230
Views
4
Ans

PL/SQL Procedure
o

Pallavi_2507

PL/SQL Interview Questions

What is the difference in CREATE or [REPLACE] Procedure and to drop a procedure and create
it again? What does REPLACE do, Does it drop the existing one and create the new one with
same name?
Abhijit Musale

o
Mar 23rd, 2015
PLSQL objects and views can be replaced if pre-exists using REPLACE keyword .
souvik

o
Nov 16th, 2014
If you drop the procedure, then all the privileges are gone which you will have to give again while
creating the program. But CREATE OR [REPLACE] command will keep the privileges intact.
Answer Question
o

Select Best Answer

NOV

242011

09:14 AM

11086
Views
3
Ans

What are Oracle Hints and How do you use them ?


o

Jaikumar D V

PL/SQL Interview Questions

Explain the real-time situation where would you use Oracle Hits
Abhijit Musale

o
Mar 23rd, 2015
To override the flow of execution and priority of the execution we can use oracle optimizer hints.(e.g.
PARALLEL,APPEND,etc.)
kalpana

Oct 28th, 2014

Optimizer hints are used with SQL statements to alter execution plans.We are suggesting oracle how
the statement should be executed.
syntax : /*+RULE */

Answer Question
o

Select Best Answer

MAR

152006

01:43 PM

14539
Views
20
Ans

How to return more than one value from a function?What are the
types of triggers?What are the features of oracle 9i
o

aseemnaithani

PL/SQL Interview Questions

ace1234567

o
Mar 4th, 2015
Please find the template. Using out type parameter we can return more than one value from a
function.
Code
o

CREATE OR REPLACE FUNCTION


RETURN NUMBER

IS

BEGIN

FUN_TEST(var1

VARCHAR2,var2 VARCHAR2,result OUT VARCHAR2)

END;

shyam

o
Mar 2nd, 2015
Yes, we return more than one value in function using package. Example::
Code
o

create package pack

is

type mul_val is record

(emp_id

emp_name employees.last_name%type);

end pack;

employees.employee_id%type,

and the return type of function is that pack type.....


Answer Question Select Best Answer
2.

JUN

262009

03:43 AM

2774
Views
1
Ans

Access Cursor Output


o

mkansakar

PL/SQL Interview Questions

How to access cursor output from web application and present the record set in tabular form?
ace1234567

o
Mar 4th, 2015
Using ref cursor and returning output in the plsql table we can return the result in tabular format.
Answer Question
o

Select Best Answer

FEB

262015

01:56 PM

2464
Views
1
Ans

How do you optimise your pl/sql code?


o

Teenzh

PL/SQL Interview Questions

How to optimise your pl/sql code? Not using explain plan which is for tuning the quey
ace1234567

o
Mar 4th, 2015
The best technique used is to avoid repeatative coding by putting repeated logic in a
subroutine/function. Save the DML operations after a specific interval or records
insertion/updation/deletions , depending on your archive log size.
Answer Question
o

Select Best Answer

JUL

172012

02:59 AM

9277
Views

12
Ans

Can we insert multiple nulls through unique constraints ?


o

sachinkshd

PL/SQL Interview Questions

Shri

o
Feb 27th, 2015
Yes we can insert multiple null values as UNIQUE constraint allows multiple null values to insert
and also one null value cannot be compared with another null value.
Abhijit Musale

o
Feb 18th, 2015
If ur unique contains only one column then u can insert only one null. If u have 2 then u can insert
two null values but with different combinations like (1,null) and (null,1).
Answer Question
o

Select Best Answer

NOV

062014

02:03 AM

4300
Views
9
Ans

Use of Indexes
o

Sruthi

PL/SQL Interview Questions

What are indexes used for ? What are the different types of Indexes?
lakshmi

o
Feb 20th, 2015
Index is schema object.which is an entry for each value that are appear index column.index used to
give a direct access and also increase the performance .
types of indexes:
simple,composite,function based,bitmap,bit treeindex
Abhijit Musale

o
Feb 18th, 2015
It is not necessary that adding an index will always help. When u have less no. of records then there
is no need to add index. An index is an additional database object to improve the data i/o operations.
Answer Question

Select Best Answer

Showing Questions 21 - 40 of 511 Questions


First | Prev | Next | Last Page
Sort by:
Answers
|
Date
Jump to Page:
2

HAVE INTERVIEW QUESTION?


Please select the most appropriate category and mention a brief question title along with clear
question details.

Sort by:
Answers
|
Date
Jump to Page:
3

OCT

12:55 PM

062012

6123
Views
5
Ans

Transaction management in triggers


o

sidd_130

PL/SQL Interview Questions

Can we give COMMIT or ROLLBACK within a trigger?


Abhijit Musale

o
Feb 19th, 2015
Using PRAGMA AUTONOMOUS_TRANSACTION we can treat the child transaction as a separate
transaction, committing which wont affect the parent transaction.
Tushar

o
Feb 17th, 2015
No we cant used it.because it affected on logical processing. It is possible using Pragma
Answer Question

NOV

Select Best Answer

222014

04:08 AM

4280
Views
7
Ans

Adventages of package over standalone procedure


o

sandeep

PL/SQL Interview Questions

What are the advantages of packages over standalone procedure ?


abhijit musale

o
Feb 18th, 2015
You can wrap/encrypt the package code .
jkcboys

o
Jan 4th, 2015
Packages will be pre-compiled components, will improve performance compare to standalone one.
Answer Question

FEB

Select Best Answer

172015

02:08 AM

1946
Views
1
Ans

Why do we use cursors ?


o

vamsi1810

PL/SQL Interview Questions

Guys can you please help me in realtime scenario?


Abhijit Musale

o
Feb 18th, 2015
Whenever you want to perform some operation on a set of result of rows , then we use the
cursor.Cursor is nothing but a work space allocated on the memory. When u fire a query that set of
rows is stored in the cursor temporarily.
Answer Question

FEB

Select Best Answer

172015

03:39 AM

2409
Views
1
Ans

Why we use collections in PL/SQL ?


o

AYAN BHAUMIK

PL/SQL Interview Questions

Abhijit Musale

o
Feb 18th, 2015
To make the operations faster. When we need to do any operation on data like some calculations and
when u need to fetch the data repetitively , in that case we can use the collections like PLSQL table.
Answer Question

Select Best Answer

092013

MAY

11:00 PM

12464
Views
6
Ans

How to reverse string without using string function?


o

vinit0180

PL/SQL Interview Questions

killvinkill

Feb 3rd, 2015

DECLARE
input varchar2(30);
reverse varchar2(30);
n integer(3);
BEGIN
input:=&input;
for n in reverse 1..length(input) loop
reverse:=reverse||substr(input,n,1);
end loop;
dbms_output.put_line(reverse);
end;
/
harsh

o
Sep 22nd, 2014
Answer:"plsql reverse a string in oracle : DECLARE V_string VARCHAR2(10):=SRIRAM;
V_reverse VARCHAR2(10):=null; V_string1 VARCHAR2(10); v_count NUMBER; BEGIN
v_count:=length(V_stri...
Answer Question

Select Best Answer

122007

SEP

12:58 AM

5965
Views
9
Ans

Char(20) = 'name' varchar2(20)='name' When comparing these


two values, are the spaces padded in char are considered or not?
Are both values equal?
o

ricky

PL/SQL Interview Questions

suvijyo

Feb 2nd, 2015

"c declare s1 char(10):=name; s2 varchar2(10):=name; begin if s1=s2 then


dbms_output.put_line(both are equal); else dbms_output.put_line(both are equal); end if; dbms_ou...
chinnu

o
Jan 27th, 2015
Char datatype is fixed,but it cant be reused. eq: char(10) -- elena,first 5 characters will be filled
remaining field are padded.
varchar2 datatype fixed,but it can be reused. eq: varchar2(10) -- elena, first 5 characters will be filled
and remaining fields are reused.
Answer Question

DEC

Select Best Answer

052014

01:44 AM

3341
Views
4
Ans

What are different data structures supported by PL/SQL.??


o

Preeti Kulkarni

PL/SQL Interview Questions

Eltonclardy

o
Jan 9th, 2015
Yes PL/SQL have different data types compared to C and C++. These two datatypes in SQL i.e scalar
and composite are very mush useful in SQL.
Hema nagaraju

o
Dec 19th, 2014
Scallar,composite datatypes.
scllar datatypes are varchar2,number
composite datatypes are records,tables,collections which can store multiple values at a time
Answer Question

Select Best Answer

JUL

242013

01:23 AM

14306
Views
14
Ans

Query to retrieve one entire column data


o

shankar

PL/SQL Interview Questions

Write a query to retrieve one entire column data of multiple rows into one single column of
single row?
hema nagaraju

o
Dec 20th, 2014
SELECT listagg (ename, ,) within group( order by ename) FROM emp
Geet

Dec 4th, 2014

Code
o

SELECT REPLACE(EMP_NAME , ,, ) "EMPLOYEE NAME"

FROM (SELECT

FROM

EMPLOYEE);

Answer Question
2. DEC

STRAGG(EMP_NAME) EMP_NAME

Select Best Answer

052014

10:16 AM

3145
Views

1
Ans

What is procedure and package


o

ram

PL/SQL Interview Questions

Hi ,can any one tel pls what is use ofprocedures and packages? why we use can anyone tell me
with one real time example
HEMA NAGARAJU

o
Dec 20th, 2014
Procedures are dataobjects which are stored in a database. We can define an operation in procedure
and we call the procedure many times in the application. Packages are collection of subprograms,
pro...
Answer Question
o

Select Best Answer

JUN

142013

05:37 AM

14810
Views
10
Ans

How to update a rows with opposite gender in Sql?


o

raiyaans

PL/SQL Interview Questions

In Emp table there is a column which consists of gender (Male or Female) ? How should one
Can update the Values of Male to Female and Female to Male with a single query ?

sandeep

o
Nov 22nd, 2014
I need to update in the table not to select can u guys show me how to change directly in the database
NARSIMHA

o
Nov 13th, 2014
SELECT DECODE(GENDER,M,F,F,M,NULL) FROM EMP
Answer Question
o

Select Best Answer

NOV

212014

02:09 AM

2263
Views
1
Ans

What is the use parameterized cursor in PL/SQL ?


o

what is the use of parameterized cursor in pl/sql?

PL/SQL Interview Questions

sandeep

o
Nov 22nd, 2014
This was used when you are going to use the cursor in more than one place with different values for
the same where clause.
Answer Question
o

Select Best Answer

JUL

01:47 AM

112009

4234
Views
1
Ans

Call a Procedure in Trigger


o

sandeep.bawalia

PL/SQL Interview Questions

How to call a Procedure in Trigger and if any exception occurs in trigger then How do we
rollback it?
Ayaz Uddin

o
Nov 20th, 2014
Create or replace trigger trg
after insert on emp
for each row
begin
myproc(:new.empno, :new.ename);
end;
Answer Question
o

Select Best Answer

NOV

132014

02:51 PM

5383
Views
3
Ans

Oracle Cursors in Pl/SQL


o

sumit

PL/SQL Interview Questions

Why we use cursor in plsql? in same case can we use cursor or procedure?? difference between
cursor , procedure and package?? is any relation between 3??
parul priya

o
Nov 20th, 2014
We use cursor when we need to handle multiple rows query in plsql.
Bhanuprasad

o
Nov 14th, 2014
Cursor in Plsql: When we execute sql query. The records fetched from sql query, information about
sql query is stored in context memory area in oracle. so in order to access each record row by row we
...
Answer Question
o

Select Best Answer

NOV

062014

02:05 AM

3047
Views
2
Ans

Moving data from 1 table to Another


o

Sruthi

PL/SQL Interview Questions

How can you move the entire data from one table to another? If in same instance and in different
instances, both cases?
KARTHIKA

o
Nov 6th, 2014
Use the below code to perform the task
Code
o

INSERT INTO

NEWTABLE(COLUMNNAME)

SELECT

FROM

OLDTABLE.COLUMNNAME

OLDTABLE

WHERE

OLDTABLE.COLUMNNAME=CONDITIONVALUE;

A MOHAN KUMAR

o
Nov 6th, 2014
INSERT INTO < old table > SELECT * FROM < new table > Note the table should have same
column name and their respective data types as old table
Code
o

INSERT INTO

Answer Question
2.

new_table_name

SELECT * FROM

EMP

Select Best Answer

JUN

102013

08:07 AM

10561
Views
4
Ans

How can we insert into a table by fetching data from more then
one table by using only single command
o

Nitin kumar

PL/SQL Interview Questions

I have 3 tables , same no of columns ,i want to insert whole the data from all these table into a
single table,which also having same no of column and the same data type.
sateeshchandra

o
Oct 14th, 2014
"sql INSERT ALL INTO suppliers (supplier_id, supplier_name) VALUES (1000, IBM) INTO
suppliers (supplier_id, supplier_name) VALUES (2000, Microsoft) INTO customers (customer_i...
J. Ali (PL/Sql)

Nov 29th, 2013

INSERT INTO DYMMY (VAL)


SELECT COLUMN_VALUE val FROM table (tab_contents_nt (1, 2, 3))
UNION ALL
SELECT COLUMN_VALUE val FROM table (tab_contents_nt (4, 5, 6))
UNION ALL
SELECT COLUMN_VALUE val FROM table (tab_contents_nt (7, 8, 9))

Answer Question
o

Select Best Answer

OCT

242012

06:10 AM

4102
Views
1
Ans

Web testing
o

Ramu.B

PL/SQL Interview Questions

While testing a website, an image that is supposed to appear on a page does not load (for
example in IE, you would see an empty box with a small red cross icon). What type of
investigation could you carry out to find out what the cause of the problem is? What information
would you include when raising the defect
harmeet rehal

o
Oct 13th, 2014
Web testing is the name given to software testing that focuses on web applications. Complete testing
of a web-based system before going live can help address issues before the system is revealed to th...
Answer Question

Select Best Answer

122014

SEP

09:41 PM

3354
Views
2
Ans

Recursive function
o

manju_kambar

PL/SQL Interview Questions

What is recursive function, explain with example?


Vishant Gupta

o
Oct 11th, 2014
It is function that calls itself to implement some repetitive task
VIVEK

o
Sep 24th, 2014
Function is calling the same function
Answer Question

Select Best Answer

122014

SEP

09:43 PM

2615
Views
1
Ans

Function purity
o

manju_kambar

PL/SQL Interview Questions

What is function purity level and why we need it in PL/SQL function?


chaitanya

o
Sep 19th, 2014
Any function called from an sql query will have certain side effects on database state and package
variables..these side effects are classified as purity levels. there are different purity levels like 1. read
no database package state 2. write no database package state e.t.c
Answer Question
o

Select Best Answer

FEB

172011

10:11 AM

3640
Views
1
Ans

Call External Procedure


o

sk.mca6

PL/SQL Interview Questions

How to call an external-procedure from a package?


manju_kambar

o
Sep 12th, 2014
Calling procedure from other package should have following format
package_name.procedure_name;
if you are calling package in other schema, you need to create synonyms for that particular

Answer Question
o

Select Best Answer

JUL

102014

05:44 AM

5349
Views
2
Ans

What is meant by instead of cursor?


o

Nareshbtd3

PL/SQL Interview Questions

Raviteja

o
Aug 23rd, 2014
Instead of cursor is not there,, instead of trigger is used incase of complex views. when we use views
with joins
Kumar

o
Jul 25th, 2014
Its instead of trigger not cursor and it is used to apply trigger on views.

Can we write commit or rollback in trigger ?


o

sachinkshd

PL/SQL Interview Questions

Rakesh057

Jul 19th, 2014

NO.. triggers are auto commit no need of commit or rollback


Rpradeep

Jul 7th, 2014

Yes we can use commit or rollback statements in trigger by using


AUTONOMOUS_TRANSACTION pragma.

Answer Question Select Best Answer

012014

JUL

01:48 PM

10399
Views

1
Ans

Delete duplicate records without using sub query?


o

Rakesh057

PL/SQL Interview Questions

Delete duplicate records without using sub query? Is That possible


Raud Premananda
o

Jul 7th, 2014

USING "ROWID" PSEUDO COLUMN YOU CAN DELETE DUPLICATE RECORDS


Answer Question Select Best Answer

122011

MAY

10:15 AM

4217
Views

1
Ans

What is Oracle 11G PL/SQL Best Feature?

Shashank Gangimalla

PL/SQL Interview Questions

bhanu priya
o

Jul 4th, 2014

1. function result cache : stores the retured value in a cache and can b used again n again
instead of storing it in memory.
2. continue statement : passes controle from one iteration to other rather than exiting it.
3.regexp.count is introduced.
4.dbms_parallel_execute is introduced.
Answer Question Select Best Answer

JUN

262014

02:23 PM

4782
Views

4
Ans

Why we have to perform calculation part in Functions?


o

Rakesh057

PL/SQL Interview Questions

Procedure also written the values using out parameter than why we need functions?
Rakesh057

Jul 1st, 2014

Because procedure is pre compiler and function is not pre compiler so that the reason we
go for an calculation part in function
Madhav
o

Jul 1st, 2014

Procedure also written in out parameter but we can not use procedure in Sql statement.

But if we wrote function and ita cant contain DML operation then we can access this
function in SQL queries.
Answer Question Select Best Answer

JUN

302014

12:27 PM

4307
Views

2
Ans

When use Before and After Trigger?


o

Rakesh057

PL/SQL Interview Questions

When use Before and After Trigger? Please any help for this one
chaithanya
o

Jul 1st, 2014

Before trigger is used while performing DML operations and whereas After Trigger is used
for after performing DML operations Real time Example for before trigger: in banking
systems: ...
Mrutyunjay Nayak
o

Jul 1st, 2014

Before Trigger is used only when u want to restrict the invalid data entry in a table.After
trigger is used when u perform the operation in one table that will effect on other table.
Answer Question Select Best Answer

AUG

07:38 PM

092006

9665
Views

10
Ans

How to avoid using cursors? What to use instead of cursor and


in what cases to do so?
o

moviefan456

PL/SQL Interview Questions

Ashish
o

Jun 12th, 2014

You can use MERGE statements in


will save lot of time

Oracle

to avoid looping through Conventional cursors. It

KSPRADEEP
o

Oct 17th, 2012

Yes we can ..
Instead of cursor we using bulk collection or bulk binding or using %type and %rowtype
Answer Question Select Best Answer

OCT

062012

12:56 PM

9826
Views

4
Ans

Debugging PL/SQL programs

sidd_130

PL/SQL Interview Questions

How can we debug stored procedures in PL/SQL?


prasadkrish
o

Jun 10th, 2014

In procedure function can be able to use ?if yes means give example
ram
o

Jul 31st, 2013

Can any one tell how to retrieve more than one table structure at a time?
Answer Question Select Best Answer

APR

102012

02:27 PM

8033
Views

6
Ans

What is the main purpose of RETURN in functions?


o

sudnic

PL/SQL Interview Questions

What is the main purpose of RETURN in functions when we can calculate a value and pass it through
using OUT mode in procedure or functions?
Deepika S Verma
o

Mar 14th, 2014

Its a myth that function returns value whereas procedure does not, actually procedure also
return value (i.e. 0 or 1 ) at the time of exiting which indicates the success or error. Whereas
Function ret...
shivigupta

Oct 9th, 2012

create or replace procedure proc1 as begin dbms_output.put_line(Before Return Clause);


return; dbms_output.put_line(After Return Clause); end; set serveroutput on; begin proc1;
dbms_output.put_line(I...
Answer Question Select Best Answer

APR

112013

01:41 PM

3893
Views

4
Ans

FLASHBACK concept ? What is it?


o

balanagi

PL/SQL Interview Questions

Can any one help me on FLASHBACK concept ? What is it?


Deepika S Verma
o

Mar 13th, 2014

Its a feature introduced in oracle9i where oracle DB allows user to view the content of table
quickly and easily the way it was at a particular time in the past, even when it is modified
and committed...
NAVEEN
o

Mar 2nd, 2014

Execute dbms_flashback.enable_at_time(sysdate-5/1440);(for 5 minutes flash back )


Answer Question Select Best Answer

APR

04:53 AM

192006

7335
Views

6
Ans

What is PL/Sql tables?Is cursor variable store in PL/SQL table?


o

Dolly

PL/SQL Interview Questions

Pixie
o

Feb 18th, 2014

PL/SQL tables are PL/SQLs way of providing arrays. They are temporary tables in
memory and thus are processed very quickly. They are not database tables, and DML
statements cannot be issued against...
sbagai2001

May 30th, 2006

DECLARE TYPE EmpCurTyp IS REF CURSOR; // Reference Cursor - weak TYPE


NumList IS TABLE OF NUMBER; // Table of Number TYPE NameList IS TABLE OF VA...
Answer Question Select Best Answer

SEP

092004

06:04 AM

16666
Views

10
Ans

How many types of database triggers can be specified on a


table ? What are they ?

o
o

PL/SQL Interview Questions

Insert

Update

Delete Before Row

o.k.

o.k.

o.k. After...

Read Best Answer

Editorial / Best Answer


krishnaindia2007

Member Since Sep-2007 | May 6th, 2008

A trigger may be a
1. DML Trigger on tables
2. Instead of triggers on views
3. System triggers on database or schema
Based on the way it executes statements triggers are of two types
1. Statement leve trigger
2. Row level trigger
A trigger fires for three actions
1. Insert
2. Delete
3.Update
and the trigger can the fired
1. Before action
2. After action.
tarini sankar das
o

Feb 7th, 2014

Actual answer is we have 14 types of triggers in pl sql. For statement level :- 1-before insert
2-before update 3-before delete 4-after insert 5-after update 6-after delete For row level :- 7before ...
sandip.dhopat

Jun 14th, 2011

Below mentioned triggers can be specified on Table1.ROW or STATEMENT 2.BEFORE or


AFTER or INSTEAD OF Triggers3.DML (INSERT, UPDATE, or DELETE on table or view )
or DDL (CREATE, ALTER, or DROP on schema objects which includes all DB
objetcs)4.COMPOUND TRIGGERS
Improve Answer

DEC

162013

06:15 AM

6796
Views

2
Ans

Bind variabales
o

kamesh

PL/SQL Interview Questions

What are bind variables in sql? explain in detail?


pradipta

Feb 8th, 2014

The way to get Oracle to reuse the execution plans for "the statements having different hard
coded value in where clause" there should use bind variables. Bind variables are
substitution variable...
Aarti
o

Jan 15th, 2014

Bind variable is session specific variable. It is declared using variable keyword . Bind variable
cant be used in named block. It cant have default value.
Answer Question Select Best Answer

SEP

092004

06:04 AM

7133
Views

10
Ans

What are the components of a PL/SQL block ?


o
o

PL/SQL Interview Questions

A set of related declarations and procedural statements is called block.


Read Best Answer

Editorial / Best Answer


Answered by: Chandra Shekhar
o

Oct 3rd, 2005

PL/SQL Block contains :


Declare : optional
Variable declaration
Begin : Manadatory
Procedural statements.
Exception : Optional
any errors to be trapped
End : Mandatory
So only begin and end keywords are required, as needed, to process a pl/sql block.
saravanan
o

Nov 29th, 2013

NIL
prakashraj.v

Jul 14th, 2008

Component of PL/SQL Block are Declare(Optional), Begin(Mandatory), Exception(Optional),


END(Mandatory).
Improve Answer

AUG

162013

03:32 PM

6717
Views

2
Ans

Reference cursor from a procedure & pass cursor as a paramater


o

plsqlgeek

PL/SQL Interview Questions

How to call/reference a cursor defined in a procedure A from another procedure B?


How to pass a cursor as a parameter of a cursor?
UTTAM GHOSH
o

Oct 31st, 2013

How I can an Ac dynamo of a car/vehicle test with a12v dc battery good or bad
Pavan
o

Aug 27th, 2013

This can be done by using REFCURSORS.


Answer Question Select Best Answer

OCT

062010

08:52 AM

13688
Views

4
Ans

COLLECTIONS
o

sdas84jobs

PL/SQL Interview Questions

1-WHAT IS DIFF BETWEEN VARRAY AND TABLE?2-WHAT IS SQL SUPPORT FOR NESTED TABLE?
3-WHAT IS INLINE STORAGE AND OUT OF LINE STOGARE OF THE NESTED TABLE?4-WHAT ARE
COMMON EXCEPTION RELATED WITH COLLECTION?5-CAN U DECLARE VARRAY OF VARRAY OF
VARRAY OF TABLE?6-GIVE SAMPLE DEFINATION OF VARRAY OF OBJECT AND TABLE OF
OBJECT?7-WHAT ARE COMMON METHODS OF HANDLING EXCEPTIONS?
subhashishchaki

Oct 7th, 2013

Collections similarities and differences Collection Type Elements Limit Subscript Type
Uninitialized Status Always Dense ----------------------------------------------------------...
basukolur014

Feb 28th, 2011

Exceptions related to collections are...1.collection_is_null2.collection subscript beyond


count3.collection subscript outside limit4.no_data_found .these are more common
exceptions related to collections.
Answer Question Select Best Answer

AUG

162013

03:29 PM

4503
Views

1
Ans

Reference table from inside a procedure


o

plsqlgeek

PL/SQL Interview Questions

How do you reference a (updated) table from procedure A which is being updated by another procedure
B?
Lalit
o

Sep 15th, 2013

By taking help of global temporary table.

Answer Question Select Best Answer

NOV

242011

04:20 AM

8964
Views

5
Ans

Where would you use implicit & explicit cursors?


o

sai

PL/SQL Interview Questions

Malar somu

Sep 10th, 2013

Implicit Cursor:- It is Oracle implicit type.. when we fetch only one record then we need to
use implicit cursor i.e when ever we performing select query or any dml operations termed
as implicit curso...
hira
o

Aug 8th, 2013

When ever any query execute by the server in database sever itself create a implicit
cursor ,which can not any control to the programmer but in case explicit cursor the
programmer has to create it.and used for the data manipulation by following some rule......
Answer Question Select Best Answer

DEC

192006

02:03 PM

3291
Views

6
Ans

How to edit existing procedure in sql * plus?


o

sravan1

PL/SQL Interview Questions

Suresh kumar patra


o

Sep 10th, 2013

SQL>ed
Then Window Will Open,You Can Change Your Code.
Vinod Tuteja
o

Jun 18th, 2013

Simply Write
SQL>ed
Then Window Will Open,You Can Change Your Code .
Answer Question Select Best Answer

AUG

142013

11:30 AM

10575
Views

2
Ans

PL/SQL table vs Global Temporary Table

Sukanta2013

PL/SQL Interview Questions

Difference between PL/SQL table and Global Temporary Table. why we use Global Temporary Table
without using PL/SQL Table.
nivi
o

Sep 3rd, 2013

1.Global Temporary table is stored in Temporary tablespace while PL/SQL table is stored in
PGA. 2.SQL operations can not be performed on pl/sql tables whereas it can be performed
on GTT as any normal...
plsqlgeek

Aug 16th, 2013

PL/SQL table or associated array is a collection (data type). Where as GTT is a temp table
created to store/process data for a particular session. Once you log out of the session the
data is gone, not the table structure.
Answer Question Select Best Answer

AUG

162013

03:26 PM

6225
Views

1
Ans

What happens to the base table transactions when procedure


has some error?
o

plsqlgeek

PL/SQL Interview Questions

Procedure A calls procedure B. A updates table t1, t2. B updates table t3. If some error happens to B what
happens to the updates in all those tables? Whether they will rollback or commit? If commits how far it will
commit?
vishal.bhadange

Aug 24th, 2013

CASE 1 (If you are not handling exception in Procedure B, none of the table gets updated)
"sql PROCEDURE A BEGIN UPDATE TABLE t1; UPDATE TABLE t2; CALL
PROCEDURE ...

Sort by:
Answers
|
Date
Jump to Page:
5

APR

282006

05:14 AM

26299
Views
18
Ans

What is the difference between procedure and function and


package, which is the fastest
o

Suyog

PL/SQL Interview Questions

JILEY SINGH
Profile Answers by JILEY SINGH Questions by JILEY SINGH

o
Aug 4th, 2013
Function can be called in select statement but procedure cant be called in select statement. function
has return keyword but procedure not
Varun Tiwari

o
Jul 4th, 2013
Function Procedure 1. Can be used as column Cant used in select statement in select statement 2. Can
be used in where Cant used in where condition c...

Answer Question

Select Best Answer

202013

MAY

01:41 PM

3136
Views
1
Ans

Write ONLY ONE SQL statement which produces the following


output
o

sashelp

PL/SQL Interview Questions

DEPARTMENT_ID EMP_COUNT DEPT_PERCENTAGE


lviswanath

o
Jul 23rd, 2013
Ask the question clearly
what is DEPT_PERCENTAGE
on what basis we have to calculate DEPT_PERCENTAGE?

Answer Question

JUN

Select Best Answer

142013

03:13 AM

4440
Views

1
Ans

Overloading procedure - all parameters are default


o

tinku981

PL/SQL Interview Questions

If there are 2 overloaded procedure, one among then have 1 IN parameter and another have 2
parameters. Both procedures parameters are of default type.
What will happen when you will call package.procedure without any parameter?
Khamar

o
Jul 22nd, 2013
You will get an error message "PLS-0037: too many declarations of procedure_name match this call"
Answer Question

MAR

Select Best Answer

022013

02:56 PM

2549
Views
1
Ans

Group By
o

mikeslazak

PL/SQL Interview Questions

Create a query using group by that shows maximum salary for each department?
lviswanath

o
Code

Jul 17th, 2013

SELECT

deptno, MAX(sal) max_sal

FROM

GROUP BY

emp
deptno;

Answer Question
2. JUN

Select Best Answer

112013

02:15 AM

5374
Views
3
Ans

Why cant we use commit inside a trigger?


o

Nitin kumar

PL/SQL Interview Questions

Varun Tiwari

o
Jul 4th, 2013
Any data transaction control statement can not be used in triggers. As trigger invokes due to any
DML event and the transaction may not be successfully commit later and may need to complete
rollback.
Pragma_autonomous can be used as an alternate way to commit.
prashant mhatre

o
Jun 13th, 2013
Can not used ...if we want to use it inside the trigger then use pragma_autonomous.
Answer Question
o

Select Best Answer

JUN

02:14 AM

112013

5464
Views
2
Ans

Can we use function inside a trigger


o

Nitin kumar

PL/SQL Interview Questions

Is it possible to use function inside a trigger.


tinku981

Jun 16th, 2013

Code
o

CREATE OR REPLACE TRIGGER

before

FOR

INSERT ON

emp_trig

emp

each row

--referencing old as old and new as new

declare

o
o

i pls_integer;
begin

emp_pro;

i := emp_func;

dbms_output.put_line(TRIGGER called

o
o

end;

o
tinku981

AND FUNCTION

returned

||

i);

o
Jun 16th, 2013
Yes, by using CALL statement.
Answer Question
o

Select Best Answer

AUG

072006

12:49 AM

4284
Views
11
Ans

When we can declare a column as Unique and Not Null both at


the same time. What is the use pf Primary Key then?
o

Gupta

PL/SQL Interview Questions

Vinod Tuteja

o
Jun 14th, 2013
Main Difference : Referential
Index is created in both Cases (Unique and Primary key Constraint )
But can't references Columns with combination of UNIQUE and NOT NULL. Like in Primary
key ,we Can references primary key to make foreign key constraint .
z_ashwini

o
Jan 13th, 2012
Eg: Consider table emp with EMP_ID,EM|NAME,ADD columns You can define the column e_name
as Unique constraint. DECLARE e_name number(10) NOT NULL; BEGIN ... .. END: Primary key
cannot have NU...
Answer Question
o

Select Best Answer

OCT

062012

12:57 PM

6351
Views
5
Ans

Oracle Joins
o

sidd_130

PL/SQL Interview Questions

There are 2 tables, A and B having 3 rows each. What will be result on executing the following
query? : SQL> select * from A,B
Raju TT

o
Jun 11th, 2013
Cross join -cartesian product :Table a no. of rows (3) * Table b no.of rows (3)= cross join query
returns 9 rows
Code
o

SELECT

* FROM

CROSS JOIN

b ;

Arpit Agrawal

o
May 24th, 2013
Here simply answer would be 6. Since a is having 2 rows and b is having 3 rows. And we go for
Cartesian join, which means 3*2=6.
Answer Question
o

Select Best Answer

JUN

222006

05:03 AM

2402
Views

1
Ans

Can anybody tell me a sample OCI function which will be able to


call from Tourbo cthanx!!
o

Nitina

PL/SQL Interview Questions

rajkumar1237

o
Apr 27th, 2013
OCI means::oracle call interface.is a interface api used to access oracle database from C programs.
Data Guard stands for it is multiple DB servers environment configured for Physical as well as
Logic...
Answer Question
o

Select Best Answer

OCT

062012

12:53 PM

3254
Views
1
Ans

Copying data across tables


o

sidd_130

PL/SQL Interview Questions

In what ways can data be copied from one table to another?


Neeraj Saxena

o
Apr 12th, 2013
You can copy the data from one table to another with the help of below Query:
Suppose dummy is the main table and we need to copy the data from dummy_120413 table.

Create tabel dummy_120413 as Select * from dummy;

Answer Question
o

Select Best Answer

JUN

012006

03:41 PM

10491
Views
16
Ans

What is the data type of Null?


o

Ramakrishnan

PL/SQL Interview Questions

rayavarapu

o
Jan 23rd, 2013
Null is not a value and not a string. It is unknown it is maximum in descending order and minimum
value in ascending order.
Sandeep

o
Char(0)

Mar 7th, 2012

Answer Question
o

Select Best Answer

JUN

092006

03:45 AM

4071
Views

12
Ans

Difference between truncate and delete


o

rojalina begum

PL/SQL Interview Questions

Hasan

o
Dec 15th, 2012
Truncate is a ddl...delete is dml
cannot rollback data in truncate...rollback data in delete
truncate -delete entire data not structure...it delete specific datas
VASU

o
Oct 20th, 2012
By using delete we have to delete particular records only..
If we use truncate we cannot retrieve the data permanently...
Answer Question
o

Select Best Answer

OCT

062012

12:52 PM

5719
Views
2
Ans

Autonomous transactions
o

sidd_130

PL/SQL Interview Questions

What is an autonomous transaction?

Sonal

o
Nov 7th, 2012
The AUTONOMOUS_TRANSACTION pragma changes the way a subprogram works within a
transaction. A subprogram marked with this pragma can do SQL operations and commit or roll back
those operations, without ...
VASU

o
Oct 20th, 2012
BY USING AUTONOMOUS TRANSACTION
WE GET THE FOLLOWING ADVANTAGES
WE PROCEDURE HAVING TRANSACTIONS STATEMENTS WE CALL PROCEDURE
AUTOMATICALLY EFFECT THE ABOVE TRANSACTIONS ALSO TO OVERCOME THAT
PROBLEM WE HAVE TO USE AUTONOMOUS TRANSACTION..
Answer Question
o

Select Best Answer

OCT

062012

12:54 PM

8382
Views
1
Ans

Oracle collections
o

sidd_130

PL/SQL Interview Questions

What are the types of collection in PL/SQL? What is the advantage of nested tables?
pawan

o
Nov 6th, 2012
Varrays,nested tables,index by tables are oracle collection.Index by tables also known as associative
array similar to hashtables in java. Varrays are like arrays in java static in nature need to d...
Answer Question

Select Best Answer

MAR

192007

01:48 AM

23330
Views
12
Ans

What is the use of nocopy parameter in oracle procedure


o

ily_saravanan

PL/SQL Interview Questions

Hi, What is nocopy parameter in oracle procedure. what is the use of it. In which situation,we
can use the nocopy parameter.Thanks,Saravanan.P
Himansu

o
Nov 6th, 2012
In procedure,Function there are three types of parameter is there. eg-IN, OUT, INOUT. IN parameter
is call by reference and OUT & INOUT are call by value. Always call by reference is faster than
call ...
Saket

o
Apr 3rd, 2012
Pass by reference: "IN" Case
Pass by value : "Out" or "IN OUT" Case which have the overhead of copying the value to new
procedure parameter.
In order to make to Pass by reference we will use NOCOPY
Pass by reference: "OUT NOCOPY" or "IN OUT NOCOPY" which deals which the actual reference
value.
Answer Question
o

Select Best Answer

JUL

03:36 AM

252006

7513
Views
10
Ans

State the difference between implict and explict cursor's


o

senthil

PL/SQL Interview Questions

chiatanya

o
Nov 5th, 2012
Implicit cursors are automatically generated,when a sql statement is processed where as
Explicit cursors are user defined.
VASU

o
Oct 20th, 2012
Implicit cursors returns only single record..where as explicit cursor multiple records. But it process
record by record.
Answer Question
o

Select Best Answer

OCT

062012

12:55 PM

3233
Views
1
Ans

Dropping a type in Oracle

sidd_130

PL/SQL Interview Questions

Can a type body be dropped without dropping the type specification?


ramya

o
Oct 31st, 2012
When you drop a type body, the object type specification still exists, and you can re-create the type
body. Prior to re-creating the body, you can still use the object type, although you cannot call the
member functions.
Answer Question
o

Select Best Answer

OCT

062012

12:58 PM

4391
Views
1
Ans

Oracle locks
o

sidd_130

PL/SQL Interview Questions

With what ways can we find out instance locks?


Jose George

o
Oct 22nd, 2012
V$lock contains details of locks
Answer Question

Select Best Answer

092004

SEP

06:04 AM

5045
Views
7
Ans

What is a cursor for loop ?


o
o

PL/SQL Interview Questions

Cursor for loop implicitly declares %ROWTYPE as loop index,opens a cursor, fetches rows of
values from active set into fields in the record and closeswhen all the records have been
processed.
eg. FOR emp_rec IN C1 LOOP
salary_total := salary_total +emp_rec
sal;
...
vasu

o
Oct 20th, 2012
Cursor for loop is the one by using this we need not to perform open, close, fetch operations of a
cursor..
PRADEEP

o
Oct 17th, 2012
If we use explicit cursor we need to open the cursor and fetching the data and close the cursor.
If we use cursor for loop cursor will open the cursor and fetching data and close the cursor
automatically.

Answer Question
o

Select Best Answer

NOV

092011

12:24 PM

5871
Views
3
Ans

Populating Tables in Oracle 11g


o

Dany Wells

PL/SQL Interview Questions

How do you populate tables or data in Oracle 11g step by step?


Jose George

o
Oct 17th, 2012
We can use SQL Loader too
Jose George

o
Oct 16th, 2012
Depending on the situation one can use
external tables
or
UTL_FILE package

What is a database trigger ? Name some usages of database


trigger ?
o
o

PL/SQL Interview Questions

Database trigger is stored PL/SQL program unit associated with a specific database table. Usages
are Audit data modifications, Log events transparently, Enforce complex business rules Derive
column values automatically, Implement complex ...
KSPRADEEP
o

Oct 17th, 2012

Trigger is data base object .Trigger is block of code it is executed automatically when dml
operations are fired .
by using trigger we can do the auditing and perform a operation(modifications) on a tables
(using dml operation)
krishnaindia2007

May 6th, 2008

A database trigger is a named pl/sql block associated with a table and fires automatically
when an event occurs or something happens. Data auditing , Implementing complex
business rules, security are main uses of database triggers.
Answer Question Select Best Answer

SEP

092004

06:04 AM

2566
Views

6
Ans

What are the modes of parameters that can be passed to a


procedure ?
o
o

PL/SQL Interview Questions

IN,OUT,IN-OUT parameters.
KSPRADEEP
o

Oct 17th, 2012

Two modes of parameters are available to pass the parameter In and Out, the default
parameter is IN. In : Lets you pass a value to subprogram being called.It can not be
changed inside the parameter(...
g_sidhu

Jan 31st, 2008

IN (default): Passes a constant value from the calling environment into the
procedureOUT :Passes a value from the procedure to the calling environmentIN
OUT :Pa...
Answer Question Select Best Answer

192006

MAY

02:39 AM

3207
Views

4
Ans

1) Why it is recommonded to use INOUT instead of OUT


parameter type in a procedure?2) What happen if we will not
assign anything in OUT parameter type in a procedure?
o

shraddha

PL/SQL Interview Questions

KSPRDEEP
o

Oct 17th, 2012

In parameter means it will insert the values


OUT parameters means it will print out put (pass values to output). If we not assigning any
value to out parameter it will take (print) NULL value.
INOUT means it take values as input and out put
krishnaindia2007

May 7th, 2008

1.There is no hard and fast rule about this. Whether to use INOUT or OUT depends upon
the situation.2. If not assigned anything to OUT parameter it retuns NULL value.
Answer Question Select Best Answer

APR

042007

03:09 AM

5340
Views

2
Ans

What is a cluster and what is the real time use and business
reasons to use Clustering
o

subbaraovangalli

PL/SQL Interview Questions

KSPRADEEP
o

Oct 17th, 2012

Cluster are groups of one or more tables physically stores together to share common
columns and are often used together
g_sidhu

Feb 5th, 2008

Clustering is a method of storing tables that are intimately related and often joined together
into the same area on disk. For example, instead of the BOOKSHELF table being in one
section of the disk ...
Answer Question Select Best Answer

JUN

162008

08:57 AM

4868
Views

6
Ans

What is the need of primary key as opposed to using not null and
unique ?
o

sreeraghava.nara

PL/SQL Interview Questions

We can create a column with' not null+unique' with out using primary key
PRADEEP
o

Oct 17th, 2012

Primary key: set of columns is uniquely identified a rows of a table. It does not allow both
nulls and duplicate values. If we use null values it will allow duplicate values but it does not
allow n...
Radha
o

Jul 14th, 2011

We can create NOTNULL and UNIQUE constraints on single column. Which indirectly
means a Primary Key. But only a Primary Key column can be used as Foreign key column.
Primary key provides a default...
Answer Question Select Best Answer

SEP

092004

06:04 AM

19207
Views

13
Ans

What are % TYPE and % ROWTYPE ? What are the advantages


of using these over datatypes?
o
o

PL/SQL Interview Questions

% TYPE provides the data type of a variable or a database column to that variable. % ROWTYPE
provides the record type that represents a entire row of a table or view or columns selected in the
cursor. The advantages are : I. Need not know about variable's data typeii. If the database definition of
a column in a table changes, the...
PRADEEP
o

Oct 16th, 2012

%rowtype is associated entire table(if we want to declare all columns then we need to
declare %rowtype).
%type is associated with one column .(if we want to declare entire column then we need to
declare %type).
Yaseen
o

Aug 9th, 2012

If using %type and %rowtype , no need to know the the data type of the table column . and
once the development is finished , the type of column is changed it will not effect the coding.
Answer Question Select Best Answer

SEP

022005

06:44 AM

11180
Views

14
Ans

Difference between a cursor and reference cursor


o
o

PL/SQL Interview Questions

PRADEEP
o

Oct 16th, 2012

Ref cursor is having return type where as cursor does not have .
syntax of ref cursor:- type ref_type_name is ref cursor [return return_type].
syntax of cursor:- declare
cursor cursor name select statement..
pradeep
o

Jan 8th, 2012

Normal cursors do have a return type. ex:

Code
o

CREATE

package pkg_test

cursor c1

end pkg_test;

RETURN

IS

emp%rowtype;

o
o

CREATE

package body pkg_test

cursor c1

begin

FOR

..

end pkg_test;

emp_cv

RETURN

IN

emp%rowtype

IS
IS SELECT * FROM

emp

WHERE

empno

= 10;

c1 loop

o
Answer Question Select Best Answer

282006

2. JUL

03:08 AM

6497
Views

12
Ans

Explian rowid,rownum?what are the psoducolumns we have?


o

suribabu

PL/SQL Interview Questions

PRADEEP
o

Oct 16th, 2012

Rowid is octal decimal values it is stored permanently in a


while creating a table.

oracle

database. It will created

rownum is also octal decimal number but it is for only specific time span it will arise after
completed a task.
Dilip
o

Sep 3rd, 2012

Here I am providing all the psudo columns of Oracle ROWNUM, ROWID,NEXTVAL,


CURRVAL, SYSDATE, USER, LEVEL
Answer Question Select Best Answer

OCT

062012

12:52 PM

3527
Views

1
Ans

Global temporary tables


o

sidd_130

PL/SQL Interview Questions

What is a global temporary table?


Aijaz
o

Oct 14th, 2012

Global temporary tables are the permanently created tables for a timed session.
Only the data in the table is temporary but the table is permanent in the Oracle database.
Answer Question Select Best Answer

OCT

062012

12:58 PM

2694
Views

1
Ans

Finding object dependencies


o

sidd_130

PL/SQL Interview Questions

How can we find out the dependencies on a table?


srikanth goduru
o

Oct 10th, 2012

Check the table dba_dependencies and see what other tables are affected.
Answer Question Select Best Answer

312008

JUL

05:17 PM

3075
Views

3
Ans

Oracle Mass Update


o

galactus911

PL/SQL Interview Questions

How do we do mass updates in Oracle PL SQL?

shivigupta

Oct 9th, 2012

Code
o

declare

type id_table

IS TABLE

of testemp.emp_id%type;

v_id_table id_table;

o
o

begin

UPDATE

returning emp_id bulk collect

testemp

SET

subject

d1

WHERE
INTO

emp_id

= 1

v_id_table;

o
o

commit;

dbms_output.put_line(count

end;

IS:==||v_id_table.count);

GeekQA123

Aug 15th, 2012

Use Bulk Update stmt.


Answer Question Select Best Answer

SEP

092004

06:04 AM

11081
Views

4
Ans

What is Raise_application_error ?
o
o

PL/SQL Interview Questions

Raise_application_error is a procedure of package DBMS_STANDARD which allows to issue an


user_defined error messages from stored sub-program or database trigger.
Ashutosh
o

Oct 8th, 2012

Their classes of errors and diff. errors are divided among these classes simply because of
ease in classification, For defining errors and error message with raise_application_error
procedure by users...
SARANYA
o

Jul 25th, 2011

I know that the error no in raise_application_error are non standard but tell me on what
basis we are giving those numbers? is that simply a number or it some implicit meaning ?
Answer Question Select Best Answer

MAR

122012

03:26 AM

5730
Views

1
Ans

Using distinct keyword with the analytical functions


o

gaurvitul

PL/SQL Interview Questions

hi
I have to write a query to fetch 5 columns from the data. columns are title,description,msgs_count,alerts
and severity.
msgs_count is count(title) over (partition by ) and alerts is sum(title partition by) over.

in case the duplicates of title are present in data. I want the title to come only once in the output but the
msgs_count and alerts must not be affected. is it...
raghavender
o

Oct 7th, 2012

Analytic functions are used to fetch all rows with the required aggregate data, if duplicates
are needed, then you can use distinct or you can use group by clause instead of analytic
functions which will have better performance.
Answer Question Select Best Answer

MAR

202007

06:24 AM

7060
Views

9
Ans

How do you set table for read only access ?


o

nitin_kumat

PL/SQL Interview Questions

if i am updating one record in a table at that time no other user can't able insert ,update the record in
same table How is it possible
Smruti R Das
o

Sep 26th, 2012

GRANT SELECT ON table_name TO user_name


velan
o

Sep 11th, 2012

There are couple of ways 1) If there are user other than owner accessing this table then you
can "grant select on TABLE_NAME" 2) Otherwise you DBA can create a role which will
have only the privillege...
Answer Question Select Best Answer

NOV

242011

11:21 PM

12847
Views

19
Ans

How can I get recent 10 records out of 100 records


o

vinay.juri

PL/SQL Interview Questions

HI all
table contain some 1000 records, today I inserted 100 records into table, so I want first 10 records data
from 100 records
how can I retrieve
kapil joshi
o

Sep 15th, 2012

Select * from employees where rownum


Manoj Kumar
o

Aug 28th, 2012

Code
o SELECT * FROM (SELECT * FROM emp
Answer Question Select Best Answer

ORDER BY <created_date> DESC) WHERE

252010

MAY

2.

05:23 PM

2748
Views

rownum

<11

1
Ans

Query Nested Table Data


o

sandip01

PL/SQL Interview Questions

How to query nested table column of a table without using table function?
Pooja
o

Sep 3rd, 2012

There are two general ways to query a table that contains a collection type as a column or
attribute. Nest the collections in the result rows that contain them. Distribute or unnest
collections so t...
Answer Question Select Best Answer

FEB

092006

07:22 AM

5120
Views

6
Ans

Can e truncate some of the rows from the table instead of


truncating the full table.
o

Soma Bose

PL/SQL Interview Questions

Vishal R Bhadange
o

Aug 12th, 2012

Yes.
Yes we can truncate some of the rows from the table, But table should be partitioned & all
the rows to be deleted should be present in one single partition...

leelakrishna302

Jun 15th, 2012

We cannot
Answer Question Select Best Answer

OCT

232011

01:06 AM

1894
Views

1
Ans

SQL Statements Syntax


o

SAUMYA SRIVASTAVA

PL/SQL Interview Questions

How to display all rows and all the columns of employee table?
ram
o

Aug 8th, 2012

Select *from emp;


here * retriving all records from the db
Answer Question Select Best Answer

OCT

132006

11:21 AM

4147
Views

22
Ans

> Select Count(*) from T1 where a=10 3> Select count(*) from T1
where b=20 11Now, What will b the O/P of the following..select
count(*) from T1 where a=10 or b=20..............................
o

shamim909

PL/SQL Interview Questions

ChevyBlazer

Jul 2nd, 2012

The answer will be between 11-14 . You have to consider two extreme cases where 1. 3
rows with a=10 and 11 rows with b=20 are all distinct rows - then the answer will be 14 2.
Where there are 11 rows...
Venkat
o

Jun 30th, 2012

The accurate answer is "The result can contain max of 14 records", but this not guaranteed.
It can be less also. (Minimum is 10 rows and maximum is 14 rows). It is because there can
be some overlpa in the same row between "a" and "b" column.
Answer Question Select Best Answer

SEP

092004

06:04 AM

9840
Views

18
Ans

What will happen after commit statement ?

o
o

PL/SQL Interview Questions

Cursor C1 is

Select empno,

ename from emp;

Begin

open C1;

...

Vivek
o

Jun 29th, 2012

After committing first oracle will commit the transaction into redo log file and then Data file.
The data block will remain into the memory until the logical reads are going on. Oracle use
LRU algorit...
Art11

Sep 27th, 2011

The data will be written from redo log buffer into redo log files.

What steps should a programmer should follow for better


tunning of the PL/SQL blocks?Difference between procedure and
function?What is the use of ref cursor return type?
o
aseemnaithani
Profile Answers by aseemnaithani Questions by aseemnaithani
o

PL/SQL Interview Questions

Aniruddha Das
o

Jun 11th, 2012

If you want to take care of performance tuning you need to take care of sub-queries as they
takes a lot of time to executing in side the pl-sql blocks.
ptmich

May 28th, 2012

Ref cursor is used to declare a pointer variable. When you return a ref cursor, you are
returning a pointer variable.
Answer Question Select Best Answer

AUG

02:45 AM

312006

7522
Views

20
Ans

How to find the nth hightest record holder from a table


o

sandeep

PL/SQL Interview Questions

manisha
o

May 27th, 2012

Use
Code
o

NVL(a.sal,0)<= NVL(b.sal,0)

Neeraj Siddhey
o

Mar 20th, 2012

This will work:-

1.
2.

SELECT DISTINCT
WHERE 9=(SELECT

a.salary FROM emp a, emp b


DISTINCT count(b.salary) FROM emp b

132012

MAY

05:21 PM

5726
Views

1
Ans

WHERE

a.salary<=b.salary);

When would you use Inline view in Sub query?


o

Gunjan David

PL/SQL Interview Questions

vizzi
o

May 16th, 2012

When we use a select query in the from clause, it is called as a inline view. It is used to
reduce complexity of using so many join conditions.
Answer Question Select Best Answer

272008

JUL

12:55 PM

7507
Views

2
Ans

Oracle PRAGMA'S
o

Nishant.Patel

PL/SQL Interview Questions

Outline the List of PRAGMA'S used in Oracle.


amrapali
o

Apr 21st, 2012

PRAGMA The instruction is a statement that provides some instructions to the compiler.
Pragmas are defined in the declarative section in PL/SQL. The following pragmas are
available: AUTONOMOUS_TRA...
bobbyiiit

Apr 8th, 2010

PRAGMAPragma is a keyword in Oracle PL/SQL that is used to provide an instruction to the


compile.Types Of Pragmas :-1 - AUTONOMOUS_TRANSACTION2 - EXCEPTION_INIT3 RESTRICT_REFERENCES4 - SERIALLY_REUSABLE
Answer Question Select Best Answer

OCT

232007

06:59 AM

12860
Views

7
Ans

What is nested table in Oracle and difference between table and


nested table?
o

Vikramsingh

PL/SQL Interview Questions

pankti
o

Apr 6th, 2012

Nested table Unbounded ...


krishnaindia2007

May 6th, 2008

A Table is a basic unit of storage in oracle .A nested table is a collection type. The main
advantage of collections is instead of processing data sequentially, we may process all
the date&nb...
Answer Question Select Best Answer

FEB

06:37 AM

132012

4881
Views

3
Ans

Oracle exception block


o

nabiel_pathan

PL/SQL Interview Questions

In the exception part,what will happen if u dont give (when others) where will it show error compile time or
run time
NAND
o

Feb 27th, 2012

It will give the error at run time if it is not able to find the type of exception thrown in the
current PL/SQL block or the outer block.
It will not throw the compile time error.
Mark Haynes

Feb 27th, 2012

Now, to clarify, I am taking the following statement; "in the exception part, what will happen
if you don't give the (when others) statement" to mean an exception block with no other
when statements a...
Answer Question Select Best Answer

NOV

232011

12:58 AM

6971
Views

2
Ans

How to get minimum time stamp from a table ?


o

ram

PL/SQL Interview Questions

Susil Kumar Nagarajan


o

Jan 20th, 2012

Use the combination of To_char and MIN functions.. to_char(min(created),dd-Mon-yyyy


hh:mm:ss) Example:
Code
o

SELECT

to_char(min(created),dd-Mon-yyyy hh:mm:ss) Min_time

FROM

all_objects

Hitendra Yadav
o

Dec 15th, 2011

Just use min() function and find minimum timestamp from a table.
Answer Question Select Best Answer

SEP

212010

08:21 AM

3354
Views

1
Ans

Index Work
o

sarikagopan

PL/SQL Interview Questions

How does index work? How to check whether Index is pickup?


z_ashwini

Jan 13th, 2012

Indexes are created for better performance of the DB ; for faster retrival of data from DB.
There are diffierent types of indexes... (1) B tree index (2) Bitmap map index (3) Function
based index (4) ...

Answer Question Select Best Answer

AUG

202006

10:20 AM

3757
Views

3
Ans

How can i import .dmp file in lower version of oracle from higher
version ?
o

santanu koner

PL/SQL Interview Questions

ABHISHEK TYAGI
o

Jan 6th, 2012

D:oracleproduct10.2.0db_2BIN>expdp scott/tiger@ace directory=test_dir dumpf


ile=testver.dmp tables=testversion remap_tablespace=users_tbs:users Import: Release
10.2.0.1.0 - 64bit Production on Sunday...
osden
o

Oct 6th, 2007

No. You cannot export a higher version to the lower version.


Answer Question Select Best Answer

MAR

282007

01:22 AM

2554
Views

4
Ans

How to display 4th maximum sal in enp without using


subqueries?
o

suresh

PL/SQL Interview Questions

Shiyamala Devi
o

Jan 5th, 2012

Code
o

SELECT *

FROM (SELECT

player_nm, gross_sal,

RANK ()

FROM

OVER

(ORDER BY

gross_sal

DESC)

playerRank

player)

o
WHERE playerRank = 4;
This query will display 4th highest salary from the player table
sunshine60india

Jun 18th, 2011

SELECT TOP 1 * FROM (


desc)AORDER BY CTC

SELECT TOP 4 * FROM EMPLOYEE ORDER BY CTC

Answer Question Select Best Answer

AUG

252006

10:42 PM

3760
Views

7
Ans

How can i get set identity for last coloumn of the table.
o

t.madhu sudah reddy

PL/SQL Interview Questions

priya dharan raj

Nov 14th, 2011

Code
o

SELECT * FROM

(SELECT

AND

user_tab_columns

max(column_id)

FROM

WHERE

column_id

user_tab_columns

IN

WHERE

table_name=v_table_name)

table_name=v_table_name

Nitesh Srivastava TechM


o

Nov 10th, 2011

See the code below


Code
o

SELECT * FROM

AND

USER_TAB_COLUMNS

column_id = (SELECT
TABLE_NAME='EMP')

WHERE

TABLE_NAME='EMP'

MAX(column_id) FROM

o ORDER BY COLUMN_ID
Answer Question Select Best Answer

OCT

2.

202010

07:52 AM

5381
Views

2
Ans

Schedule email in oracle

USER_TAB_COLUMNS

WHERE

gt.sanwaliyaji

PL/SQL Interview Questions

How to schedule an email in oracle reports?


KARI
o

Oct 29th, 2011

UTL_MAIL: type procedure in UTL_MAIL 1)SEND (send the message without attachment)
"plsql Begin UTL_MAIL.SEND(sender
=>'karimuth@amazon.com',recipients=>'karimuthu.bala@gmail.com'...
zahar

Jun 7th, 2011

Using utl_mail
Answer Question Select Best Answer

112010

JUL

09:48 AM

5182
Views

2
Ans

Rectify Deadlock
o

srividhya_85

PL/SQL Interview Questions

If a deadlock has occured and if you have given with the dump, how will you identify that where the
deadlock has occured, how the deadlock occured and how to rectify the same.
kari
o

Oct 16th, 2011

the steps necessary to identify and rectify code causing deadlocks are: * Locate the error
messages in the alert log. * Locate the relevant trace file(s). * Identify the SQL statements
i...

skumar.t15

Aug 5th, 2010

Each user session might have one or more tasks running on its behalf where each task
might acquire or wait to acquire a variety of resources. The following types of resources can
cause blocking that c...
Answer Question Select Best Answer

MAR

202007

06:19 AM

24701
Views

9
Ans

Force View
o

nitin_kumat

PL/SQL Interview Questions

What is Force View. Why Oracle Give Facility to create force view? What is the use of force View
sonam kanungo
o

Oct 14th, 2011

As per my knowledge when view is created without base table.then the view is called as
forced view.
in this type of view is created with compilation error.
mohan
o

Oct 14th, 2011

If we create a view without having base table, that view called as forced view. it will create
with compile error. it will be in invalid till base table create.
Answer Question Select Best Answer

DEC

202006

06:11 AM

6727
Views

11
Ans

How to get the 25th row of a table.


o

Mrigen

PL/SQL Interview Questions

Dharma
o

Oct 14th, 2011

Code
o

SELECT

* FROM <Table_name> WHERE ROWID=25

mohan
o

Oct 14th, 2011

SELECT * FROM TABLE_NAMEWHERE (ROWID, 0) IN (SELECT ROWID, MOD(ROWID,


N) FROM TABLE_NAME);
Answer Question Select Best Answer

JAN

072008

10:50 AM

3343
Views

4
Ans

Debug Procedure
o

av_t66

PL/SQL Interview Questions

How to debug a procedure in SQL Prompt


srimanta sahoo
o

Oct 4th, 2011

You can debug the procedure by writting following command :


alter procedure procedure name
debug ;
puneet.kush

Apr 17th, 2008

You can debug the procedure. Oracle gives a util programme DBMS_DEBUG by which you
can debug a procedure.the full detail you can see at
http://www.oracleutilities.com/wiki/index.php?title=Dbms_debugan...
Answer Question Select Best Answer

FEB

232007

05:22 AM

15285
Views

10
Ans

How to insert data from one table to another table without insert
command and cursors
o

mandlakarna

PL/SQL Interview Questions

Neeraj yadav
o

Oct 3rd, 2011

Code

SELECT

INTO

o tablename_2 FROM tablename_1


OR can pass clause also........................
Code
o

SELECT

tablename_2

WHERE

INTO
FROM

tablename_1

VNO='CV/2011/12'

gsmanvi

Jun 27th, 2008

declarecursor cursor_name isselect col1,col2,col3from tab_name;ab_record cursor_name


%rowtype;beginopen cursor_name;loopfetch ab_record into cursor_name;exit when
cursor_name%notfound;insert into tab_n...
Answer Question Select Best Answer

JUN

092008

06:09 AM

4497
Views

3
Ans

What are optimizer hints?


o

rudhra97

PL/SQL Interview Questions

Art11

Sep 27th, 2011

A hint is an instruction to the optimizer. You can use optimizer hints with SQL statements to
alter execution plans.
muraligrandhi

Jun 23rd, 2011

The optimizer hints determines the most efficient way to execute a SQL statement after
considering many factors related to the objects referenced and the conditions specified ...
Answer Question Select Best Answer

APR

192007

06:00 AM

9144
Views

4
Ans

Explain about CURSOR and REF CURSUR with real time scenario
where this can be used.
o

gouri sankar rath

PL/SQL Interview Questions

Art11

Sep 27th, 2011

A REF Cursor is a datatype that holds a cursor value in the same way that a VARCHAR2
variable will hold a string value. It is not a cursor, but a variable that points to a cursor. It is
not limited t...
sunil
o

Jul 26th, 2011

CURSOR A cursor is a variable that runs through the tuples of some relation. This relation
can be a stored table, or it can be the answer to some query. A cursor can be used in
realtime when u nee...
Answer Question Select Best Answer

SEP

012011

10:24 AM

5988
Views

7
Ans

Deleting Duplicate Keys


o

Gopal Sanodiya

PL/SQL Interview Questions

How to delete duplicate Keys through PL-SQL in single query.


anonymous
o

Sep 27th, 2011

Code
o

SQL> DELETE FROM table_name WHERE rowid


duplicate_values_field_name);

NOT IN (SELECT

max(rowid)

FROM TABLE GROUP

BY

OR

SQL>

duplicate_values_field_name dv FROM table_name ta


min(rowid) FROM table_name tb WHERE ta.dv=tb.dv);

DELETE

<(SELECT

WHERE

rowid

Art11

Sep 21st, 2011

Assuming that ename and job is the same or First and Last name...
SELECT * FROM (SELECT empno, ename, job ,RANK() OVER (PARTITION BY ename,
job ORDER BY empno) AS SeqNo FROM emp1) WHERE SeqNo > 1

Which type of binding does PL/SQL use?


o

narayani

PL/SQL Interview Questions

Read Best Answer

Editorial / Best Answer

g_sidhu

Jan 31st, 2008

Before a PL/SQL program can be executed, it must be compiled. The PL/SQL compiler
resolves references to Oracle objects by looking up their definitions in the data dictionary.
Then, the compiler assigns storage addresses to program variables that will hold Oracle
data so that Oracle can look up the addresses at run time. This process is called binding.
How a database language implements binding affects runtime efficiency and flexibility.
Binding at compile time, called static or earlybinding, increases efficiency because the
definitions of database objects are looked up then, not at run time. On the other hand,
binding at run time, called dynamic or late binding, increases flexibility because the
definitions of database objects can remain unknown until then.
Art11

Sep 24th, 2011

This is the best answer I found:


Early binding is checking for existence of objects referred in the program unit during the
compilation phase. Late binding will not check the existence of objects till the runtime
pramodh holla

Sep 21st, 2010

It uses deferred binding...in the sense it uses both static and dynamic binding.
Improve Answer

JUN

062011

12:14 AM

5616
Views

6
Ans

How to identify missing records in a single-column table?

sandip.dhopat

PL/SQL Interview Questions

How to identify missing records in a single-column table ?Column consists of numbers in a ordered
manner but the some numbers are deleted from the table in random manner and need to identify those
rows.p.s. This table consist of only 1 row.
Satya
o

Sep 20th, 2011

"sql SELECT CASE WHEN ConNum - prev_id = 2 THEN TO_CHAR( prev_id +1) ELSE '[' ||
NVL( prev_id +1 ,1 ) || ' , ' || (ConNum-1) || ']' END AS missing_range , ConNum - NVL...
geetha
o

Aug 25th, 2011

Code
o

SELECT LEVEL FROM

CONNECT BY LEVEL <=10

MINUS

SELECT

FROM

dual

test

o
where the test table is like colA 2 4 6 7 the result will be the missing numbers..
Answer Question Select Best Answer

042011

2. MAY

01:11 PM

5235
Views

4
Ans

What command would you use to encrypt a PL/SQL application?

kperumal75

PL/SQL Interview Questions

satya
o

Sep 20th, 2011

You can use "Decode" also inspite of Translate:


Ex: select decode( 'abcdefghijk','abcdefghijk','zyxwvutsrqp') enript from dual;
tolik

Aug 3rd, 2011

Wrap command
Answer Question Select Best Answer

OCT

122007

02:27 AM

4467
Views

4
Ans

How do you call procedure have a DDL or commit/rollback


statement from a trigger?
o

piyush sachan

PL/SQL Interview Questions

VITHAL
o

Sep 16th, 2011

To handle this type of procedures we should use pragma autonomous trigger


Dilip Lakshetty

Mar 27th, 2011

Better You make your trigger body as autonomous transaction


Answer Question Select Best Answer

APR

112011

07:35 AM

5878
Views

11
Ans

How to get max value from different columns of a table ?


o

bab.mishra

PL/SQL Interview Questions

Suppose Input table is COL1 COL2 COL 3A 1 -3B -2 6c 3 -4D 9 10In sql query I want the desired output
as follows COL1 COL nA 1B 6C 3D 10Please write the query to get this output
fire_starter

Sep 15th, 2011

Hello, For my query example I have used the table test_tbl, and the columns col, col1, col2.
It also does consider NULL value in comparison, so it will show value on comparing with
NULL, and for ev...
BhushanNag

Aug 24th, 2011

SELECT COL1, GREATEST(COL2, COL3) FROM max_value_column


Regards
Bhushan
Answer Question Select Best Answer

SEP

112011

02:56 PM

4584
Views

1
Ans

How do you register concurrent program in pl/sql ?


o

sreenuharshitha

PL/SQL Interview Questions

pavankumar_greek

Sep 15th, 2011

Using packages we can run concurrently two programs .


place the programs in two files and create a package which is having the code can open
those two files. next we have to register this package to apps.
Answer Question Select Best Answer

JAN

302007

01:47 AM

5213
Views

13
Ans

Can we have same trigger with different names for a table?eg:


create trigger trig1after insert on tab1;andeg: create trigger
trig2after insert on tab1;If yes,which trigger executes first.
o

joseph

PL/SQL Interview Questions

MURTHY
o

Sep 7th, 2011

the question is very nice. yes we can have 2 triggers with same body but with different
names. ex: create trigger trg1 .................... ............................... end; create tri...
Baji Shaik

Jun 5th, 2011

yes, we cant said upto 10g oracle server executes the triggers randomly,but 11g we are
having a feature follows clause,by using this we have to control the execution of triggers
explicitly by the deve...
Answer Question Select Best Answer

MAR

102006

11:57 PM

10171
Views

9
Ans

What is ref cursor in pl/sql?


o

sandip_kate

PL/SQL Interview Questions

Sahaja Mallarapu
o

Aug 26th, 2011

A Ref Cursor is a variable that points to cursor.A ref cursor allows you to store the result of a
"bulk collect" from a table (or any PL/SQL cursor return set) into a PL/SQL table and then
reference ...
Sadashiv
o

Aug 8th, 2011

REF Cursor OR Dynamic Cursors: Query associated with cursor is not known at the time of
compilation. The select statement associated with cursor is changing at the time of running
the program Syntax...
Answer Question Select Best Answer

OCT

202006

05:33 PM

2251
Views

9
Ans

now i want the result as


(248)9078905,(234)5678909 into another table called phone2.
">

Hi Guys,i have an interview question. can anyone help me reg


this.i have a table called "phone" and filed as "phone number"
and table have values like 2489078905,2345678909now i want the
result as (248)9078905,(234)5678909 into another table called
phone2.
o

dev

PL/SQL Interview Questions

SURESHMALLIPEDDI

Aug 9th, 2011

Select '('||substr(phone,1,3)||')'||substr(phone,4) "formated phone number",phone from


phone
paresh Borad
o

Aug 1st, 2011

Use this query


create table newphone as (select '(' || substr(phnumber, 1,3) || ')' || substr(phnumber,4,10)
"phonenumber" from oldphone)
Answer Question Select Best Answer

DEC

062008

12:38 AM

5068
Views

3
Ans

Composite Variables
o

kantri

PL/SQL Interview Questions

What are Composite Variable?


Rams
o

Aug 6th, 2011

A composite variable has internal components, which you can access individually. You can
pass entire composite variables to subprograms as parameters. PL/SQL has two kinds of
composite variables, coll...
agitatedsoul10

Aug 4th, 2010

A Variable holds a value in a memory location. The Association of a variable to other


variables can be called as composite variables.
Answer Question Select Best Answer

JUN

062008

03:35 AM

4102
Views

3
Ans

PL SQL Logs
o

liaohanming

PL/SQL Interview Questions

List at least three common ways to write logs in PL SQL?


yogesh
o

Aug 4th, 2011

We can't return more than 1 value in function but by using OUT parameter we can get
multiple values in function
which is not good programming, by using ref cursor we just save memory location of
function doesn't return more than 1 value.
sububhaai

May 14th, 2009

1. Create a log table and insert your logging messages into this table.2. Write to a log file,
using the DBMS_FILE package, but this is not recomended because there is lot of I/O.
Answer Question Select Best Answer

JUN

022007

04:03 AM

7063
Views

10
Ans

Compare EXISTS and IN Usage with advantages and


disadvantages.
o

Sachin Gadakri

PL/SQL Interview Questions

saeed
o

Jul 25th, 2011

Compare EXISTS and IN Usage with advantages and disadvantages.


be_viral

Jul 14th, 2008

We should use Exists or In based on the no of records inner and outer query is expected to
return.Using Exists : Here the outer query is executed first and then inner query is
excecuted for each value...
Answer Question Select Best Answer

OCT

112006

11:57 AM

3069
Views

6
Ans

What is the diff between %Rowtype and %type?


o

Srinivas

PL/SQL Interview Questions

manoj_lanser

Jul 20th, 2011

%type is used when we have to define the datatype of a variable similar to another existing
column data-type. eg- v_id employess.employee_id%type. In this example we have make a
variable v_id similar...
Radha
o

Jul 14th, 2011

We use %type and %rowtype in PL/SQL programming part. %Type: The variable will assign
the datatype which contains in the column of that particular table we mentioned. Ex: v_eno
employee.eno%type; ...
Answer Question Select Best Answer

FEB

072011

04:56 AM

2167
Views

3
Ans

Current Database Name


o

Subashpanda

PL/SQL Interview Questions

How to know the current database name in PL/SQL?


Saravanan Govindan
o

Jul 20th, 2011

Select name from v$database;


Code
o

SELECT

name

FROM

v$database;

Saravanan Govindan
o

Jul 20th, 2011

Select name from v$database;


Answer Question Select Best Answer

OCT

082006

08:28 AM

3697
Views

4
Ans

What is difference between Cursor and Ref Cursor. Please give


example.
o

ravi kant chaturvedi

PL/SQL Interview Questions

harinath
o

Jul 15th, 2011

Cursor is a static,
ref cursor is dynamic,
we can't use ref cursor directly, so we declare cursor variable
cursor variables can't be stored in the database
Rajeshwaran
o

Oct 12th, 2006

Cursor is a structure which points to a memory locationswhile Ref-cursor is a datastructure


which point to a object which inturn points to Memory locations..the advantage of having
Ref-cursor is that we can pass dynamically the Ref-cursor as a parameter to a procedures..
Answer Question Select Best Answer

FEB

102006

11:37 AM

4314
Views

5
Ans

Based on what conditions can we decide whether to use a table


or a view or a materialized view ?

Shweta_faqs

PL/SQL Interview Questions

Radha
o

Jul 14th, 2011

We use view to be confidential about the data and to avoid the complexity of a query. But
Mviews are used for performance problem, we use mviews for faster execution of a query.
But we need to do regular refresh for mviews.
pawan_kr2007

Oct 11th, 2009

View: If a query is being used again and again then its better to create a view with that
query. The query gets stored in database as an object.Materialized view: When you want
you replicate the main ...
Answer Question Select Best Answer

MAR

052006

06:38 AM

2849
Views

8
Ans

We have a trigger on data base.in the trigger body we have


created a body using dbms_output.put_line(********) ;this should
be firedwhen ever trigger executed;
o

ravi chand

PL/SQL Interview Questions

Radha
o

Jul 14th, 2011

Triggers fire when any condition on such trigger is satisfied...but we don't know when that
trigger is going to be fired and if it is fired where can we see output of
DBMS_output.put_line.

If we want to see output of trigger when it is fired we should mention


Raise_application_error in trigger.
pawan_kr2007

Oct 11th, 2009

If you 'set serveroutput on' and execute the statement which fires the trigger the message
will display on prompt otherwise it will not.
Answer Question Select Best Answer

OCT

182006

08:15 AM

2697
Views

3
Ans

Sir,pls send me some more oftanily asked oracle interview


questions iam an one year exprience person...i need one year
oracle interview questions.....
o

basavarajkolur

PL/SQL Interview Questions

Radha
o

Jul 14th, 2011

Questions Like: Difference between Delete and Truncate Difference between Sub query and
Correlated sub query Difference between Decode and Case Different Types of constraints
Difference between...
Reks
o

Jan 10th, 2007

Questions like:what is the advantage and disadvantage of packageswhat is the use of


cursorsWhat are the exceptiions found in select queryhow to select duplicate rows,odd
number of rowshow do we use de...

Answer Question Select Best Answer

142008

JUL

09:15 AM

3938
Views

6
Ans

What is flash back query and trip stop


o

jagadeesh9

PL/SQL Interview Questions

Radha
o

Jul 13th, 2011

Flash Back query is used to get back the deleted rows & dropped tables from the database
even they are committed. To get back the dropped table: Flashback table to before drop; To
get back...
murthy 1053

Jul 2nd, 2010

Flash back query is used to retrive the data.For ex if a table is dropped and we want the
table again so at that time.syn:=FLASHBACK TABLE table_name TO BEFORE DROP.This
will work only if recycled bin is not purged.
Answer Question Select Best Answer

142008

JUL

12:19 PM

9833
Views

15
Ans

Can you add not null column to a table already containing data ?
o

be_viral

PL/SQL Interview Questions

Radha
o

Jul 13th, 2011

Yes we can add NOT NULL constraint for the column already containing data as: If the data
doesn't have null values then - Alter table modify constraint ; If the data contains null
values...
monoranjang

Jan 24th, 2011

Yes possible, try the below query:ALTER TABLE test add c1 VARCHAR2(10) DEFAULT ('a')
not nullThanksMonoranjan

SEP

202005

10:52 AM

21048
Views

7
Ans

How can we schedule the procedure to run automatically ?


o

kishorebabu

PL/SQL Interview Questions

raghu iyer

Jul 11th, 2011

You can use like this....BEGIN

Dbms_Scheduler.create_job(

...

praveen.pinisetti

Apr 6th, 2006

1)Using DBMS_JOB package,we can schedule the job.There are number of built-in
functions in that package to schedule a job.Ex:DBMS_JOB .SUBMITDBMS_JOB .RUN.2)
Using DBMS_SCHEDULERTHIS I SYNTAX FOR CREA...
Answer Question Select Best Answer

OCT

312007

12:47 AM

2637
Views

5
Ans

Can we have a Procedure in Specification but not in Package


body. If yes then whats the use of it?
o

Sant_parkash

PL/SQL Interview Questions

raghu iyer

Jul 11th, 2011

Hi, Its Not possible..... all the sub programs declared in spec must be implemented in the
body. In this case these sub programs will be private for this package only.Raghu Iyer
Sant_parkash

Dec 3rd, 2007

Yes thats true...It will be private.


Answer Question Select Best Answer

APR

032007

05:28 AM

17278
Views

4
Ans

What is difference between ROWNUM and ROWID.


o

globalanil18

PL/SQL Interview Questions

kool.bird9

Jul 9th, 2011

ROWID uniquely identifies where a row resides on disk. The information in a


ROWID gives Oracle everything it needs to find your row, the disk number, the cylinder,
block and offset ...
Oracle

RajivPrasad

May 8th, 2007

Also as mentioned by our friend rowid is a unique hexadecimal format integer which takes
up the representation as below
File: Block: Row One can retrieve rowid by using t...
Answer Question Select Best Answer

JAN

052007

01:59 AM

4865
Views

9
Ans

What is mutatinig trigger? How do you avoid mutating trigger?


o

koteshwar t

PL/SQL Interview Questions

nade_rs

Jun 25th, 2011

We can also make use of compound trigger (new feature in 11 g to avoid mutating error)
Baji Shaik

Jun 5th, 2011

The row level trigger based on a table,the trigger body can't read thedata from same
table, if you are trying to this it gives mutating errorto avoid that you must use statement
level trigger
Answer Question Select Best Answer

282006

JUL

10:23 AM

6107
Views

8
Ans

2)what is meant by forward declaration in functions?">

1)what is the starting "oracle error number"?2)what is meant by


forward declaration in functions?
o

suribabu

PL/SQL Interview Questions

muraligrandhi

Jun 23rd, 2011

A forward declaration means that modules (procedures and functions) are declared in
advance of their actual body definition. For example, if program A calls program B and
program B calls program A,&nb...
KD09714

Jun 26th, 2008

Example of forward declaration in package : CREATE OR REPLACE PACKAGE


pkg_CBRef_Seq AS PROCEDURE sp_CBRCreateDropSeq_scd ( p_cod_CountryCode IN
country.country_code%TYPE, ...
Answer Question Select Best Answer

MAR

182006

03:08 PM

47222
Views

29
Ans

What is difference between "Primary key" and "Unique key"?


o

Babar Shabbir

PL/SQL Interview Questions

sunshine60india

Jun 18th, 2011

Primary KEY is the combination of UNIQUE and NOT NULL constraint


neha.awasthi1

May 19th, 2011

Both primary key and unique contain unique value.1: primary key cant be nullUnique key
can be null.2: Multiple column of table van be defined as unique key.Only one column can
defined as primary key
Answer Question Select Best Answer

JAN

302007

01:49 AM

3443
Views

7
Ans

What is the order of execution if there is a statement level and


row level trigger on a same table?
o

joseph

PL/SQL Interview Questions

Baji Shaik

Jun 5th, 2011

The orders of triggers execution is like this 1.before statement level 2.before
row level 3. after row level 4 after statement level
samareshp

Apr 22nd, 2009

Order of triggre firing :::::::Before Statement levelBefore Row levelAfter Row levelAfter
Statement level
Answer Question Select Best Answer

FEB

072007

10:33 AM

4201
Views

3
Ans

HiWhile creating a table, what is the difference between


VARCHAR2(80) and VARCHAR2(80 BYTE)?
o

kkanmani

PL/SQL Interview Questions

Baji Shaik

Jun 5th, 2011

Varchar2(80) accept upto 80 characters,varchar2(80 byte) accept upto 80*8=640


characters
psingla

Apr 28th, 2010

If system parameter NLS_LENGTH_SEMANTICS is set to defaultthen no differenceIf


system parameter NLS_LENGTH_SEMANTICS is changed from default behavior BYTE to
CHAR.then VARCHAR2(80) means VARCHAR...
Answer Question Select Best Answer

FEB

162007

10:29 PM

9595
Views

4
Ans

What is diff between strong and weak ref cursors


o

ddkdhar

PL/SQL Interview Questions

Baji Shaik

Jun 5th, 2011

Strong ref cursor return value, but seek ref cursor it can't return any value

askvenki

Jul 20th, 2007

A strong REF CURSOR type definition specifies a return type, but a weak definition
does not.DECLARE TYPE EmpCurTyp IS REF ...
Answer Question Select Best Answer

SEP

242006

02:07 AM

3279
Views

9
Ans

Suppose thr are 10 DMLs(insert,update,delete ) in the main


section of the PL/SQL block .The exception in them is handled as
a whole in the exception handling section .....The error may occur
in any of this DMLs ,so how can we understand that which DML
has failed ??
o

Oracle_learner

PL/SQL Interview Questions

sandeshshinde000

Jun 4th, 2011

begin DML 1 ' ' ' ' ' DML 10exceptionwhen others thandbms_output('error at location '||
dbms_utility.format_error_backtrace);e...
BakulPatel

May 7th, 2011

To simplify Remove exception block. Oracle will show line number with error thrownOther
method:beginlocation :=1; dml1 location :=2; dml2exception when others than&nb...
Answer Question Select Best Answer

FEB

082006

02:47 AM

2943
Views

9
Ans

What is PL/SQL table? SNO MARK ------- ------------------1 592 403


A4 60 Write a single query to I) Sorted Marks II)First mark III)
replace the mark A with 0(zero)?
o

chiranjeevi reddy

PL/SQL Interview Questions

NehaChanda

May 22nd, 2009

We can not use MAX on PLSQL table. Check if it works.Create a PLSQL Table
Sorted_Mark.SNO_MARK(3) := 0; - Replace ASorted in another Collection Typeselect
culumn_valuebulk collect into Sorted_MARKfrom table (cast(SNO_MARK as
PLSQL_DATATYPE))order by column_valueSorted_MARK(1) - First Value
samareshp

Apr 15th, 2009

I guess the the question should be replace a with zero then sort the mark and
then show first mark, Let me know if i am wrong.
select max(mark)
from (
SELECT sno, mark
FROM (select sno, decode(mark, 'A', 0, mark) x from t) xt
ORDER BY x
)
Answer Question Select Best Answer

FEB

072011

04:41 AM

2431
Views

1
Ans

PL/SQL UTL_FILE Package


o

Subashpanda

PL/SQL Interview Questions

Which exception is used in UTL_FILE package in PL/SQL?


dinesh.smhdr

May 19th, 2011

The package specification of UTL_FILE defines seven


exceptions.INVALID_PATHINVALID_MODEINVALID_FILEHANDLEINVALID_OPERATION
READ_ERRORWRITE_ERRORINTERNAL_ERRORNO_DATA_FOUNDVALUE_ERRORIN
VALID_MAXLINESIZE
Answer Question Select Best Answer

SEP

192005

11:40 AM

4585
Views

7
Ans

">

Talk about "Exception Handling" in PL/SQL?

Beena

PL/SQL Interview Questions

krishnaindia2007

May 6th, 2008

A warning or error condition is called an exception. An exception may raise in a pl/sql block
due to designing faults, coding mistakes or hardware failure. If an exception raises in a
block ...
g_sidhu

Jan 31st, 2008

You can handle exception in two ways: Trap it with a handler : If the exception is raised in
the executable section of the block, processing branches to the corresponding exception
handler...
Answer Question Select Best Answer

SEP

272005

06:53 AM

1983
Views

11
Ans

Can procedures have parameters


o

sreelatha

PL/SQL Interview Questions

krishnaindia2007

May 6th, 2008

Procedures Can have Parameters. But parameters is optional .i.e. we may defined
procedures without parameters also.It can take three types of parametersIN , OUT and
INOUT.
kanchan Patra
o

Aug 7th, 2007

Yes, Procedures can have parameters.


Answer Question Select Best Answer

SEP

092004

06:04 AM

23936
Views

3
Ans

What is Pragma EXECPTION_INIT ? Explain the usage ?


o
o

PL/SQL Interview Questions

The PRAGMA EXECPTION_INIT tells the complier to associate an exception with an oracle error. To get
an error message of a specific oracle error.
e.g. PRAGMA EXCEPTION_INIT (exception name, oracle
error number)
Devendra Tawar

Apr 27th, 2011

Use for handle user defined exception.


g_sidhu

Jan 31st, 2008

PRAGMA EXCEPTION_INIT statement associate the declared exception with the standard
Oracle server error number. PRAGMA EXCEPTION_INIT tells the compiler to associate an
exception name with an Oracle er...
Answer Question Select Best Answer

JAN

07:03 AM

182011

3038
Views

1
Ans

Oracle Locks Concept


o

vrushali

PL/SQL Interview Questions

Please explain How to set locktime out in Oracle.


NareshAB

Apr 24th, 2011

Set Lock_Timeout Time (in ms)Thanks


Answer Question Select Best Answer

FEB

162007

10:33 PM

4243
Views

3
Ans

What is dense_rank function and it's usage ?


o

ddkdhar

PL/SQL Interview Questions

Teju_hassan

Apr 20th, 2011

See the below example to understand better.select dense_rank,rank,salfrom empsorder by


sal descdense_rank|rank|sal1
&...

g_sidhu

Feb 5th, 2008

Rank Function can cause non-consecutive rankings if the tested values are the same.
Whereas, the dense_rank function will always result in consecutive rankings.
Answer Question Select Best Answer

MAR

052006

10:55 AM

2149
Views

3
Ans

Can we call a procedure into another procedure?If yes means


how you can pass the perameters for the two procedures?
o

kumar71979

PL/SQL Interview Questions

debasisdas

Apr 11th, 2011

I believe an example would be best way to explain this.The scenario is whan user passes
an employee_no to be inserted into EMP table i wan that value to be check against the
existing record. If the em...
Arun
o

Oct 27th, 2006

Hi friendit is easyExamplecreate or replace procedure first_proc (v_name1 in varchar,


v_age in number) isbegindbms_output.put_line(v_name||' is '||v_age||' years
old!');end;create or replace procedure...
Answer Question Select Best Answer

MAR

082011

05:03 AM

2646
Views

1
Ans

Why and When would you use a package instead of standalone


procedures? Which one increases performence - package or
standalone procedure?
o

gangadhar6708

PL/SQL Interview Questions

mailtonagaraja

Mar 24th, 2011

Hi , 1) In Package we can combile all related objects into one component, whenever you
refer or call any object in the package , full package will be copied to the memory , so that
next ti...
Answer Question Select Best Answer

FEB

172011

03:07 AM

1986
Views

0
Ans

Call FieldControls

jalaramaiah_k

PL/SQL Interview Questions

How can we call fieldcontrols in PL/SQL programming?

User Defined Exception Handler


o

Subashpanda

PL/SQL Interview Questions

Suppose a programmer creates a user defined exception handler Invalid_Number in declare block with
type EXCEPTION and raise this exception in begin block. Then how will you access the user defined
exception and same system defined exception (i.e Inavlid_Number)
promisinganuj

Feb 10th, 2011

The system defined exceptions in Oracle are tied to Oracle error codes. For this case,
system defined error INVALID_NUMBER is tied with error code -01722.Now, when a user
defines the sa...
Answer Question Select Best Answer

JUN

272008

01:59 AM

3444
Views

5
Ans

PL SQL Procedure in Package


o

kondla

PL/SQL Interview Questions

Procedure in package perfomes fastly over normal procedure, Explain.


monoranjang

Jan 24th, 2011

A Storeprocedure is a Set of transactional SQL statements which will do some operation.


Storedprocedure is precomplied . When we use sp's in our application it will reduce network
traffic because ...
muraligrandhi

Jun 8th, 2010

It's true. Procedures in the packages are faster than the stand alone procedures, because
all the procedures in the package are compiled once and stored in the SGA at shared pool
area. If we call the ...
Answer Question Select Best Answer

JAN

182011

07:07 AM

3112
Views

2
Ans

Unconstrained Loop
o

vrushali

PL/SQL Interview Questions

What is unconstrained loop?suggest some example.


Art11

Sep 27th, 2011

Did you mean infinite loop?


vikz.pal

Jan 23rd, 2011

Unconstrained loop means loop that can't be handled as per our will.Basic loop is a simple
example of unconstrained loop - if we ignore proper exit statement in basic loop then it
becomes an infin...
Answer Question Select Best Answer

OCT

062010

08:43 AM

3109
Views

3
Ans

DATATYPES
o

sdas84jobs

PL/SQL Interview Questions

1-WHAT IS THE MAX LENGHT OF VARCHAR2 DATATYPE IN PL/SQL?2-WHAT IS THE USE OF


UROWID?3-WHAT ARE THE SUBTYPES?GIVE ANY 2 EXAMPLE?4- WHAT IS THE GENERAL
STANDARD FOR DECLARATION?
pravesh28

Dec 27th, 2010

1... max length is 327672 rowid means row plus id actuall its psedocolmn that store the
value of each rowwith the help of rowid>>> we can remove duplicate value>>> we can
dispa...
muraligrandhi

Nov 9th, 2010

1. Maximum length of a varible in PL/SQL is 32767 bytes2. The UROWID or Universal


Rowid is useful for storing logical addresses of all the rows of Index-organized tables. It can
store both the logical...
Answer Question Select Best Answer

SEP

092004

06:04 AM

2453
Views

4
Ans

How packaged procedures and functions are called from the


following?
o
o

PL/SQL Interview Questions

a. Stored procedure or anonymous block b. an application program such a PRC *C, PRO*
COBOL c. SQL *PLUS
a. PACKAGE NAME.PROCEDURE NAME (parameters);
variable :=
PACKAGE NAME.FUNCTION NAME (arguments);
EXEC SQL EXECUTE ...
shi_fu

Nov 30th, 2010

a. procedure is called by its name:pack_name.proc_name;function is called from a


expression:a=b*(function(param));b.(same as above)procedure is called by its
name:pack_name.proc_name;function is calle...
g_sidhu

Feb 16th, 2008

a. PACKAGE NAME.PROCEDURE NAME (parameters);


NAME.FUNCTION NAME (arguments);
b. ...
Answer Question Select Best Answer

MAR

282010

07:34 PM

4355
Views

variable := PACKAGE

4
Ans

Bulk Data Operations


o

sue86

PL/SQL Interview Questions

You are developing a PL/SQL block designed for bulk data operations. When attemping to store table
data for multiple rows in a PL/SQL variable, which one of the following choices identifies the mechanism
best suited for this task (choose one)? A. cursorB. varchar2C. recordD. table of records
rahulg5211

Oct 25th, 2010

Table of record type is best option to perform this operation.becouse first thing pl/table has
unlimited size.second thing for fetching bunch of record into pl/table,besides of INTO
clause we ne...
shukla.prashant76

Apr 28th, 2010

Answer is D. We need multiple rows on a variable so we use here Table of records .it uses
just like as collection of records.Cursor is used for selecting multiple rows from stored
table.Var...
Answer Question Select Best Answer

NOV

232006

09:37 AM

7048
Views

2
Ans

Difference between pre-query & post-query

Ramachandra

PL/SQL Interview Questions

kalpana2u95

Oct 12th, 2010

Pre SQL query means that the integration service runs SQL commands against the source
database before it reads the data from source. Post SQL query means IS runs
SQL commands against target database after it writes to the target.
Pawan Ahuja
o

Dec 4th, 2006

Pre-query trigger fires only ones while post-query trigger fires each time.the Post-Query
trigger fires each time Form Builder fetches a record into a block.RegardsPawan Ahuja
Answer Question Select Best Answer

SEP

122006

12:44 AM

4362
Views

4
Ans

How can u create session variable in pakages?


o

suri

PL/SQL Interview Questions

asraf_pa

Oct 10th, 2010

You can use DBMS_SESSION to set & get session variable. Below is the example for the
sameSQL> EXEC DBMS_SESSION.SET_CONTEXT('CLIENTCONTEXT', 'myvar',
'myvalue');PL/SQL procedure successfully co...
rampratap409

Dec 11th, 2006

session variable can not be declared in package, variable declared in package are called
global variables. create package mypack isnum number := 7;num2 number;end ;here num,
num2 are global vari...
Answer Question Select Best Answer

AUG

022009

07:31 PM

4985
Views

8
Ans

Debugging Dynamic SQL


o

sanjeevlabh

PL/SQL Interview Questions

What is the best technique of debugging large and fragmented dynamic SQL.
kumardba

Oct 7th, 2010

You can try to debug Dynamic SQL using SQL Advisor Tool or TKPROF tool
shivaranjani.p

Oct 6th, 2010

Hi,You need to store each and every line of the dynamic sql in a file using UTL_FILE
Package before you could execute it, so that you can refer the same file after executing the
code, this here serves...
Answer Question Select Best Answer

AUG

09:15 AM

092007

2734
Views

3
Ans

Write sample code that can create a hierachical set of data


without using a start with and connect by clause in PL/SQL
o

soorajsk_84

PL/SQL Interview Questions

Art11

Sep 27th, 2011

My example is not perfect but close."sql SELECT deptno, job, ename, sal
,CURSOR( SELECT ename, deptno, job, sal , DENSE_RANK () OVER (ORDER BY sal
desc) rnk ...
dipanjan80

Oct 6th, 2010

Using LEAD analytical function its possible to get hierarchical set of data. Here is an
example: SELECT deptno, empno, sal, LEAD(sal, 1, 0) OVER (PARTITION BY dept
ORDER BY sal DESC NULLS LAST) N...
Answer Question Select Best Answer

OCT

132005

09:27 AM

1992
Views

9
Ans

How would you hide a table in sql. ie the table can be only visible
to its maker.
o

abhishek

PL/SQL Interview Questions

Not known yet


ankurlibra

Sep 26th, 2010

We are misunderstanding the question and I assume that Abhishek want to say that "How
we can hide a table info from user?".To hide table info or as per question make it invisible to
other user. A tabl...
pravelu

Apr 23rd, 2010

It can be done using role grants. Grant view or debug privileges to only the set of users who
can see these tables. The other users who are not granted the privilege cannot view this
table. Every single user is a Schema in Oracle.It is by default, that the table cannot be seen
by others.
Answer Question Select Best Answer

APR

232006

04:19 AM

7421
Views

3
Ans

What is a purity level? How it is should be taken into


consideration when your writing any database objects i.e.,
trigger,function, procedure etc.,
o

kameshakundy

PL/SQL Interview Questions

asrafpa

Sep 26th, 2010

The function purity level defines what structures the function reads or modifies. Following
are the purity levels 1) WNDS - Writes No Database State i.e. Function does not modify any
database tables ...
pari
o

Mar 14th, 2007

pragma_restrict_references is a compiler directive to check the purity level of functions used


in packages.The restriction on a function that it cannot do update, insert or delete when
used in select ...
Answer Question Select Best Answer

MAR

062009

04:56 PM

3336
Views

8
Ans

Package Function
o

harit79

PL/SQL Interview Questions

You have a package called A and one function in that packgae called XYZ.If you need to call that function
in second packaged B, How will you call?
Raj_P

Sep 1st, 2010

1) VarName := PackageName.FunctionName(<Parameter List>).2) Select


PackageName.FunctionName(<Parameter List>) From <TableName? You cannot run this
statement if y...
shekhar2010

Aug 30th, 2010

Yes we can call a function which is there in a Package 'A' from Package 'B'. And it is very
simple as stated belowPackage_Name.Function_Name(Parameter_List);
Answer Question Select Best Answer

252010

MAY

11:17 PM

3015
Views

6
Ans

Status of Procedure
o

anulc

PL/SQL Interview Questions

If a procedure is referring a table and if the structure of the table is changed, lets say data type of the any
column is changed, then is it possible that the status of the procedure remains valid? Explain
Read Best Answer

Editorial / Best Answer


tar.goyal

Member Since Aug-2010 | Aug 4th, 2010

It is possible that a procedure remain valid even when the data type of columns of a table
on which it is operating change.
This can be achieved by using Anchor declaration i.e. %TYPE and %ROWTYPE while defining reference to
such table columns and rows respectively in the procedure.
tar.goyal

Aug 4th, 2010

It is possible that a procedure remain valid even when the data type of columns of a table
on which it is operating change.This can be achieved by using Anchor declaration i.e.
%TYPE and %ROWTYPE while defining reference to such table columns and rows
respectively in the procedure.

anironic

Jul 21st, 2010

If PL/SQL stored SP %type and does not explicity declare a datatype, then it is quite
possible that Stored procedure remains valid, even after changing the datatype in the table.
Ex, you have a declar...
Improve Answer

062006

MAY

08:43 AM

1420
Views

3
Ans

How can i get the procedure's, function's name from a package if


it is wrapped(both spec & body).
o

biswajit

PL/SQL Interview Questions

Gaurav_Vashishtha

Jul 27th, 2010

You can get the source code of the wrapped pakage from dba_source table.
ravikumarzee@gmail.com

Mar 9th, 2007

Desc e.g., If u want to know the procedures and functions in a package called xyz thendesc
xyz;
Answer Question Select Best Answer

062010

JUL

12:30 PM

2775
Views

1
Ans

Package Without Body


o

Raj_P

PL/SQL Interview Questions

What is the use of a package without body?


Gaurav_Vashishtha

Jul 27th, 2010

Package without body is used to declare global cursors and constants which can be used
by other function, procedures or packages
Answer Question Select Best Answer

072010

JUL

03:10 AM

3048
Views

1
Ans

PL/SQL Synonym
o

kanchanG

PL/SQL Interview Questions

What are the advantage of Synonym in PL/SQL


mukesh1009

Jul 9th, 2010

Dear Kanchan Maheshwari There are two categories of synonyms, public and private. A
public synonym can be accessed by any system user. The individual creating a public
synonym does not own the sy...
Answer Question Select Best Answer

AUG

262009

03:27 AM

2294
Views

2
Ans

Recreating and Rebuilding Indexes


o

sowjanya.valaparla

PL/SQL Interview Questions

What is recreating and rebuiding of indexes?


sktest

Jul 11th, 2010

ALTER INDEX REBUILD


raghunadhn

Mar 3rd, 2010

Rebuilding IndexSyntax: Alter index index_name rebuild.If you rebuild the index, the existing
index will be dropped and created immediately, and any overheads existing on the index wil
be removed. The...
Answer Question Select Best Answer

MAR

02:44 PM

012007

6090
Views

5
Ans

What are the advantages and disadvantages of DBMS-SQL


o

ddkdhar

PL/SQL Interview Questions

neerajalatha

Jul 7th, 2010

Disadvantages:It is slow when compared to native dynamic SQL and coding is also difficult
when compared to native dynamic SQL.
stshekhar

Jun 22nd, 2008

Disadvantage : 1) Executing DDL statements through dbms_sql sometime can result in


deadlock. example : we are trying to drop one object at the time it is being accessed by
other user.
Answer Question Select Best Answer

DEC

202006

06:15 AM

2204
Views

6
Ans

How can i see the time of execution of a sql statement?

Mrigen

PL/SQL Interview Questions

machomanic

Jul 8th, 2010

You can use the command SQL> SET TIMING ON;This will show how much time your
query took for the execution.
neerajalatha

Jul 7th, 2010

We can find the time of execution of a sql statement using dbms_utility.get_time


packageeg:declarev1 integer;v2
number;beginv1:=dbms_utility.get_time;dbms_output.put_line(v1);select count(*) into v2
from employee;v1:=dbms_utility.get_time;dbms_output.put_line(v1);end;/

JUN

192010

09:46 AM

1409
Views

1
Ans

SQL Statments in Packages


o

my_colorado

PL/SQL Interview Questions

If you have to call same piece of code at many places in a package, How do you achieve this without
calling the function many times?
kanchanG

Jul 7th, 2010

We can use 'Go To' statement in this case.

Answer Question Select Best Answer

SEP

202005

10:50 AM

2589
Views

7
Ans

What is the output of the following pl/sql block ?declare


v_empno emp.empno%type;begin select empno into v_empno
from emp where empno = 10;exception when others then
dbms_output.put_line ( 'no data found'); when no_data_found
then dbms_output.put_line ( 'ther is no data found ');end;
o

Kishorebabu

PL/SQL Interview Questions

when others then *ERROR at line 6:ORA-06550: line 6, column 2:PLS-00370: OTHERS handler must be
last among the exception handlers of a blockORA-06550: line 0, column 0:PL/SQL: Compilation unit
analysis terminated
kiran_marla

Jul 6th, 2010

Error occurs, why because "when others" must and should be placed at last in exception
block
neerajalatha

Jul 5th, 2010

when others then*ERROR at line 6:ORA-06550: line 6, column 2:PLS-00370: OTHERS


handler must be last among the exception handlers of a blockORA-06550: line 0, column
0:PL/SQL: Compilation unit analysis terminatedThis is right answer
Answer Question Select Best Answer

FEB

072006

02:14 AM

3426
Views

6
Ans

Can any one explain Perforance Tuning in PL/SQL


o

Srinu

PL/SQL Interview Questions

neerajalatha

Jul 5th, 2010

Performance tuning can be improved by using FOR ALL and BULK COLLECT clauses in
place of FOR LOOP and CURSORS which makes the application faster and better.
ORA_CRAZY

Nov 19th, 2009

Using Bulk binding concepts, we can tune the PL/SQL job that takes long time due to
millions of records.
Answer Question Select Best Answer

SEP

092004

06:04 AM

5154
Views

6
Ans

What is PL/SQL table ?


o
o

PL/SQL Interview Questions

Objects of type TABLE are called "PL/SQL tables", which are modeled as (but not the same as)
database tables, PL/SQL tables use a primary PL/SQL tables can have one column and a primary
key. Cursors
Read Best Answer

Editorial / Best Answer


rkanth18

Member Since Sep-2005 | Nov 26th, 2005

A PL/SQL table is a one-dimensional, unbounded, sparse collection of homogenous


elements, indexed by integers
One-dimensional

A PL/SQL table can have only one column. It is, in this way, similar to a onedimensional array.
Unbounded or Unconstrained

There is no predefined limit to the number of rows in a PL/SQL table. The PL/SQL
table grows dynamically as you add more rows to the table. The PL/SQL table is,
in this way, very different from an array.
Related to this definition, no rows for PL/SQL tables are allocated for this structure
when it is defined.
Sparse

In a PL/SQL table, a row exists in the table only when a value is assigned to that
row. Rows do not have to be defined sequentially. Instead you can assign a value
to any row in the table. So row 15 could have a value of `Fox' and row 15446 a
value of `Red', with no other rows defined in between.
Homogeneous elements

Because a PL/SQL table can have only a single column, all rows in a PL/SQL
table contain values of the same datatype. It is, therefore, homogeneous.
With PL/SQL Release 2.3, you can have PL/SQL tables of records. The resulting
table is still, however, homogeneous. Each row simply contains the same set of
columns.
Indexed by integers

PL/SQL tables currently support a single indexing mode: by BINARY_INTEGER.


This number acts as the "primary key" of the PL/SQL table. The range of a
BINARY_INTEGER is from -231-1 to 231-1, so you have an awful lot of rows with
which to work
neerajalatha

Jul 5th, 2010

A PL/SQL table is a database table having one column and rows are stored not in
predefined order. Associative arrays and nested tables comes under category of
PL/SQL.
babu.sridharan

Jul 14th, 2008

Example for PL/SQL table:==================In the below block "typlsql" and


"ty_plsql2" are PL/SQL tablesdeclaretype ty_plsql is record ( empno number,
ename varchar2(50));TYPE ty_...
Improve Answer

SEP

292008

10:10 AM

5938
Views

6
Ans

Explicit cursor and Select into statement


o

varma.ukk

PL/SQL Interview Questions

What is the difference between an explicit cursor and select into statement?
neerajalatha

Jul 5th, 2010

Select statement can return multiples rows at a time and there exists only one network
round trip.Explicit cursors are memory areas which acts as a handle or pointer to context
area and allows to fetc...
rashlikesu

May 12th, 2010

When select into query returns just one row, Oracle uses implicit cursor to execute and fetch
the results for the query.But if the select statement returns more than one row, an Explicit
cursor is created to fetch the data.
Answer Question Select Best Answer

NOV

252008

05:59 PM

3819
Views

5
Ans

Pipe Function and Mutating Trigger


o

harit79

PL/SQL Interview Questions

1) Why we use pl/sql array rather than cursor?2) In which condition we use function overloading? 3) What
is pipe function?4) What is the mutating trigger? What should be the condition?
renu_db_dev

Jul 2nd, 2010

1) Why we use PL/SQL array rather than cursor?PL/SQL array is a collection through which
we can iterate just the way we can through cursor. But in case of Cursor the context
switching is for every row...
avis_sarkar

Oct 14th, 2009

Triggers are PLSQL block or Procedures which get executed whenever:1) an INSERT,
DELETE or UPDATE happens on a table. 2) DDL like ALTER or CREATE happens on a
table. 3) an INSTEAD OF trigger on a view...
Answer Question Select Best Answer

FEB

242006

05:20 AM

1644
Views

2
Ans

How to display loop counter at the screen using PL/SQL loop ?


o

skmishra_it

PL/SQL Interview Questions

Showstopper

Jun 21st, 2010

Begin for loopcounter in 1..10 loop dbms_output.put_line(loopcounter); end loop; end; / This
piece of code will display the loopcounter in a PL/SQL loop on the screen
mekshi_2kk

Mar 6th, 2006

Using dbms_output.put_line(loop counter variable);


Answer Question Select Best Answer

JUN

112008

01:03 PM

4894
Views

2
Ans

Paging In Oracle

vijay.patil2005

PL/SQL Interview Questions

Hi All,I have requirement of sending the records based on the input received from web.I have a ref_cursor
returning 30 rows..Here I am supposed to do paging on the set of records present in the above ref
cursor.If web gives 1 , then I should send first 10 records in the ref cursor..If gives 2 , then I should send
next 10 records in the ref cursor..similarly..I will get some sort of indicator from...
muraligrandhi

Jun 9th, 2010

With the help of Ref cursor you can get particular no of records(means 1=10 records,2=20
records like that), for that you can use rownum in the filter condition.If you add below query
in Ref cursor yo...
pvidhya

Sep 3rd, 2008

First you have to filter the no of records you need totally (i.e., if you receive input as 2 and if
the no of records you need to return are 20, then you need to filter 20 rows) using where
rownum
Answer Question Select Best Answer

JUN

262008

06:56 AM

4462
Views

4
Ans

Purpose of Ref cursor and OUT parametr in PLSQL Function?


o

ramyaselvi16

PL/SQL Interview Questions

What is the purpose of Ref Cursor and OUT Parameter in PLSQL Function? Give Examples for each?
muraligrandhi

Jun 9th, 2010

Main advantage of Ref cursor is you can get the output as record set. For example if you
are using Java or .Net or cristal reports for reporting purpose then you can use Ref cursors
and write a subpro...
pratap557

Oct 13th, 2009

By Ref cursor we can send record set to the calling programLike .NET VB page can get
recordset as datatable from ref cursor returned by a procedure.OUT parameter sends only
one value from procedure
Answer Question Select Best Answer

JUN

122008

03:57 AM

2871
Views

3
Ans

How to find error line of a package at run time


o

sanjoy.dubey

PL/SQL Interview Questions

How can the error line can be identified for a package at run time ?
muraligrandhi

Jun 9th, 2010

There are two ways for finding error line in a package


1. SHOW ERROR
2. DBMS_UTILITY.FORMAT_ERROR_BACKTRACE
First method is useful for all the versions but second one is 10G or above versions only.
tripathi.atul

Sep 9th, 2008

Starting from Oracle 10G we can use DBMS_UTILITY.FORMAT_ERROR_BACKTRACE


function to get the line from where the error originated.

Answer Question Select Best Answer

MAR

222009

01:28 AM

4110
Views

4
Ans

DeCode Performance
o

test2008

PL/SQL Interview Questions

Performance wise which is a better option if-else construct or a decode? Why


muraligrandhi

Jun 7th, 2010

DECODE is faster than IF-THEN-ELSEREASON:Decode is an Oracle built-in function, so


no need to pass parameters to this function. Because all the parameters are internally
defined but If-then-else statements we should define explicitly, so takes time for execution
and converting into P-code.
sanjeevlabh

Jan 22nd, 2010

The answer to this question would actually depend on the type of applicability of the usage
that is being done. i.e. is it required in a query or in a PLSQL block. If it is in a query we
cannot use if...
Answer Question Select Best Answer

FEB

12:02 AM

182009

3902
Views

2
Ans

Infinite Loop
o

sandeep_sb4

PL/SQL Interview Questions

How will you stop an infinite loop without closing the program?
muraligrandhi

Jun 7th, 2010

For terminating the INFINITE LOOP we can use EXIT statement.Example: LOOP
monthly_sales:=daily_sales*31; EXIT when monthly_sales > 3000; END LOOP;
joe0082

Apr 13th, 2009

Use the EXIT statementThis will stop the looping and proceed to the next executable
statement.or EXIT WHEN condition
Answer Question Select Best Answer

DEC

202006

06:14 AM

2828
Views

2
Ans

How to change owner of a table?

Mrigen

PL/SQL Interview Questions

chaitunitk

Jun 3rd, 2010

Owner of a table is the schema name which holds the table. To change the owner just
recreate the table in the new schema Using create table XXX AS select * from
oldschemaname.XXXand drop the previous table in oldschema
Das
o

Dec 20th, 2006

Owner of a table is the schema name which holds the table. To change the owner just
recreate the table in the new schema and drop the previous table
Answer Question Select Best Answer

APR

152009

05:58 AM

3224
Views

4
Ans

Find null value in a table


o

kthy86

PL/SQL Interview Questions

What are all the different ways available to find the null value in a table
NSingh

May 22nd, 2010

select * from tab_namewhere col_name is null


psingla

May 6th, 2010

In pl/sql:"is null" and "is not null" are the best way to find null and not null values resp.In tsqlif ansi_nulls is off then(set ansi_nulls off)"=" will work to search the null values

Answer Question Select Best Answer

OCT

022004

12:00 AM

1911
Views

2
Ans

What are the characteristics of autonomous transactions?


o
o

PL/SQL Interview Questions

ajeeteng

May 5th, 2010

Autonomous transactions refer to the ability of PL/SQL temporarily suspend the current
transaction and begin another transaction. The second transaction is known as an
autonomous transaction, an...
uday
o

Jun 29th, 2007

Autonomous transaction defined and executed independent of calling program. u need to


define PRAGMA AUTONOMOUS_TRANSACTION at declare section. stored procedure,
function can be defined as autonomous transaction.
Answer Question Select Best Answer

NOV

222005

05:35 AM

16256
Views

10
Ans

Can we create trigger on SELECT statement? If we can create,


how?
o

SumanNaidu.S

PL/SQL Interview Questions

psingla

May 6th, 2010

In 10g we can
Andrew
o

Sep 7th, 2007

May be it is better to trace a select statment with on logon trigger.like:CREATE OR


REPLACE TRIGGER SYS.ON_LOGON_ALL AFTER LOGON ON DATABASE WHEN
(USER = 'MAX') BEGIN EXECUTE IMMEDIATE 'AL...
Answer Question Select Best Answer

OCT

022004

12:00 AM

1387
Views

1
Ans

What is the use of PL/SQL procedure


DBMS_TTS.TRANSPORT_SET_CHECK?
o

PL/SQL Interview Questions

ajeeteng

May 5th, 2010

The DBMS_TTS package checks if the transportable set is self-contained.


TRANSPORT_SET_CHECK Procedure This procedure checks if a set of tablespaces (to be
transported) is self-contained. After calling this procedure, the user may select from a view
to see a list of violations, if there are any.
Answer Question Select Best Answer

APR

112007

02:41 AM

2040
Views

2
Ans

What are Hash, Nested loop and merge-sorted Join.


o

Ram Kumar

PL/SQL Interview Questions

psingla

Apr 27th, 2010

There are three types of alogrithm used by SQL compiler for joining purpose:1) Nested join
algo2) Hash join algo3) Merge join algoComplier choose any one of these algo based on
the best suited for per...
norman

May 8th, 2007

In hash join hash table gets build using the inputs. Nested loops as the name implies uses
looping construct strategy for storing and retrieving. In terms of performance comparison
while retrieving da...
Answer Question Select Best Answer

NOV

122006

11:28 PM

1456
Views

5
Ans

Help me to write a procedure for:verify a table for record if it is


exists need to update or else insert that record( using cursor
write a procedure )
o

Srinivas

PL/SQL Interview Questions

psingla

Apr 27th, 2010

In Oracle 9i and above this can be achived in single query (merge query)
ss
o

Sep 25th, 2007

Insert the row you want you as if it doesn't exist, in the exception write the update
statementBegin//Inser the rowExceptionwhen< row already exists>//update the rowEnd
Answer Question Select Best Answer

012007

MAY

02:13 AM

2292
Views

2
Ans

When using a count(distinct) is it better to use a self-join or temp


table to find redundant data, and provide an example?
o

hindol_saha

PL/SQL Interview Questions

psingla

Apr 28th, 2010

to find the reduntdant data try "group by"


manish.baehal

Apr 5th, 2009

COUNT(Distinct) is better than using Self Join to find redundant data as it is faster and
shorter. Beside this COUNT(Distinct) provide more flexibility.

How PL SQL is different from T-SQL


o

raafay

PL/SQL Interview Questions

psingla

Apr 28th, 2010

PL/SQL is procedural language.It is built upon sql with extra added functionalities.It is used
by ORACLE .robust and consistentexception handling is great the concept of package is
greatdisallow bad co...
Yaseen
o

May 12th, 2007

SQL (Structures Query Language)PL/SQL (Procedure Language / SQL) is the Oracle's


version with lots of additional proprietary functions.T-SQL : Transact-SQL is Microsoft's
proprietary version of SQL.
Answer Question Select Best Answer

APR

282010

01:22 AM

2917
Views

0
Ans

Call SOAP Web Service from PL/SQL


o

psingla

PL/SQL Interview Questions

How a SOAP web service can be called from PL/SQL block?How can we handle the result set returned
by the SOAP service?
Answer Question

JAN

232007

05:26 PM

1205
Views

3
Ans

What is the maximum number of data string can be returned from


DBMS_OUTPUT? andHow do you call a trigger from a table?
o

Lisa

PL/SQL Interview Questions

psingla

Apr 27th, 2010

2) Triggers cannot be called rather they are fired automatically based upon their
specification.
MuralidharanR

Mar 16th, 2007

The maximum buffer size of DBMS_OUTPUT IS 1,000,000. A database trigger is


procedural code that is automatically executed in response to certain events on a particular
table in a database. Trigger can not be executed manually
Answer Question Select Best Answer

FEB

122008

06:55 AM

1108
Views

3
Ans

Querying Customer Details from a Table


o

Pavithara

PL/SQL Interview Questions

How to query the customer details from a Table who have purchased No. of items greater than 5?
psingla

Apr 27th, 2010

I guess the table structure would be liketable_name (custname,item_purchased)so query


will be:select custname from table_name group by custname having count(*)>5
rajivgupta780184

Aug 11th, 2008

Select column 1,...column n from table namewhere purchaseno 5 order by purchaseno;try


this one .....ThanksRAJIV GUPTA YOGIK TECHNOLOGIES PVT LTD.JAMSHEDPUR
Answer Question Select Best Answer

SEP

052008

05:47 AM

1708
Views

1
Ans

Load White Space Delimited Data


o

ramesh.akula9

PL/SQL Interview Questions

How to load whitespace delimited data using SQL*Loader?


psingla

Apr 21st, 2010

1. Create a ontrol file with extn (.ctrl). This file will map the flat file data with the Oracle table
columns.2. Pass control file as one of the parameter of SQL Loader.
Answer Question Select Best Answer

MAR

162009

06:38 AM

2055
Views

3
Ans

Call SQL Script

tnagarjun

PL/SQL Interview Questions

How to call SQL script file from PL/SQL?


dj_dj_dj

Mar 18th, 2010

You can Call SQL Script by using @ and then giving path of the source fileFor ex:
@c:/sqlscript.txt;RegardsDharmendra Jaiswal
prasadreddi

Mar 17th, 2010

@<path>filename.sqlgive the path where the file is located extactly.Ex :- Let us say our file
is located at c:tempabc.sqlSQL> @"c:tempabc.sql" It is better practice to use double qu...
Answer Question Select Best Answer

SEP

262005

08:09 AM

1402
Views

11
Ans

Plz clarryfy this.Scinario is whether we can use out mode in


functions?.I thought it's not possible. But in interview they are
asking this.if i am telling no,they are not accepting me.Plz clarify
this anyone.
o

George Suresh

PL/SQL Interview Questions

kiran_marla

Mar 9th, 2010

There is no difference between function and package, except function must and should
return a value while procedure do not. But it is not a good practice to use out mode in
functions.However a default...

vishadk

Mar 7th, 2010

I believe you are asking about the use of 'out' in the function declaration.One can use 'Out'
mode in the functions in the manner simlar to procedure i.e.Create or Replace function
fun_out_example(par...
Answer Question Select Best Answer

SEP

052008

07:10 AM

1080
Views

2
Ans

Autonomous Transcation
o

ramesh.akula9

PL/SQL Interview Questions

What are advantages of Autonomous Transcation?


raghunadhn

Mar 3rd, 2010

Autonomous transactions are independent of the main transactions.You can commit the
changes in the other tables using these transactions, even though the main transaction is
not a success. Depending on one transaction, you can commit/rollback the other
transactions.
namita04

Dec 23rd, 2009

A autonomous transaction starts with the first SQL statement of the PL/SQL block and ends
with a commit.
Answer Question Select Best Answer

OCT

252005

10:54 PM

2450
Views

11
Ans

You have compiled some PL/SQL packages in your schema, and


found aome errors in one procedure.how do you find which
procedure produced the error?how do you find which section of
the code produced the error and look at?
o

Mohammad

PL/SQL Interview Questions

No answer
samareshp

Feb 13th, 2010

While creating a package, we can use Show error Command to get the line number thats
has error. And can be corrected. Even we can check in the data-dictonary view i.e.
user_errors to figure out the er...
gem023

Feb 11th, 2010

On SQL Plus you can give the command - show errors. This would show the line number
and reason for the compilation error.
Answer Question Select Best Answer

AUG

062007

02:32 AM

5554
Views

4
Ans

What is the difference between right join and right outer join..
o

MuthuKrishnan

PL/SQL Interview Questions

samareshp

Feb 13th, 2010

Both are same.outer join : We have 3 types of outer joins. Left Oute, Right Outer and Full
Outer join.Left outer join:Select * from lefttable, righttable where
lefttable.col1=righttable.col1(+)This wi...
krishnaindia2007

May 13th, 2008

Both are same. Right outer join returns all the reocrds that satisfy the join condtion + rest of
the records from right (or second) table.
Answer Question Select Best Answer

SEP

272006

07:03 AM

2013
Views

7
Ans

I want to tune the below query for performance issue can u


please help me the query is SELECT
DISTINCTA.BUSINESS_UNIT,A.CUST_ID,A.ASOF_DTFROM
PS_ITEM_ACTIVITY A WHERE A.BUSINESS_UNIT = '1100G'AND

A.ITEM LIKE 'OA%' AND A.PO_LINE = 0AND A.ENTRY_REASON


'CLEAR'AND A.ASOF_DT > '01-JAN-1900'AND A.USER1 = '
'UNIONSELECT
DISTINCTA.BUSINESS_UNIT,A.CUST_ID,A.ASOF_DTFROM
PS_PENDING_ITEM A WHERE A.BUSINESS_UNIT = '1100G'AND
A.ITEM LIKE 'OA%' AND A.PO_LINE = 0AND A.ENTRY_REASON
'CLEAR'AND A.ASOF_DT > '01-JAN-1900'AND A.USER1 = ' 'AND
A.POSTED_FLAG = 'N'AND ERROR_FLAG = ' '
o

snehal

PL/SQL Interview Questions

kvsubramanian

Feb 2nd, 2010

Try to Replace "AND A.ITEM like 'OA%'" with " AND substr(A.ITEM,1,2) = 'OA' ".
nagarajbng

Oct 3rd, 2009

If you are using the UNION keyword then there is no need of using the distinct keyword in
your query or else you can use UNION ALL keywordorBelow I am sending the modified
queryIn your query which col...
Answer Question Select Best Answer

DEC

242009

10:06 AM

2639
Views

2
Ans

Execute Immediately

abhi_only12000

PL/SQL Interview Questions

What is the meaning of execute immediately?


hmounir

Jan 25th, 2010

EXECUTE IMMEDIATE is the replacement for DBMS_SQL package from Oracle 8i onwards.
It parses and immediately executes a dynamic SQL statement or a PL/SQL block created
on the fly. Dynamically created a...
Brajesh Singh Bhadoriya

Jan 25th, 2010

Execute immediate is used to prepare dynamic SQL. There might be scenario where one
has to prepare the SQL statement at run time in a PL/SQL object. Execute immediate
requires one SQL statement which ...
Answer Question Select Best Answer

OCT

232009

07:29 AM

3394
Views

2
Ans

Types of Lock
o

beethakker

PL/SQL Interview Questions

Explain share and exclusive type of lock.


hmounir

Jan 25th, 2010

Oracle uses two modes of locking in a multi-user database:Exclusive lock mode (X)
prevents the associates resource from being shared. This lock mode is obtained to modify
data. The first transaction t...

rahulmca

Jan 24th, 2010

The two basic types of locks are DML (table) locks, and DDL (dictionary) locks. DML locks
are designed to guarantee data integrity in a multi-user environment. DML locks prevent
conflicting DML and DD...
Answer Question Select Best Answer

AUG

172008

06:53 AM

4693
Views

5
Ans

TCL Statements in Trigger


o

bmsrao

PL/SQL Interview Questions

Why are we not supposed to include TCL statements in a trigger?


manveshv

Dec 30th, 2009

The trigger is fired when an event occurs while manipulating the data in table.So the trigger
applies a lock on it restricting others to modify it.Locks are released when a TCL command
is executed. Th...
Vansat

Jun 16th, 2009

We cannot use TCL statements in triggers, because using them violates the integrity of the
transaction. But if we want TCL statements to be used in triggers then that can be
implemented by using Auton...
Answer Question Select Best Answer

252006

MAY

05:20 AM

1753
Views

3
Ans

I want to insert the following information in userAction


table:Which user execute which query on which date?the
userAction table contains the foolowing attributes:USER DATE
QUERYplease write to me how to resolve this problem?
o

alex

PL/SQL Interview Questions

harinicm

Dec 11th, 2009

Use AUDIT is used to track the occurrence of the sql statements in the subsequent user
sessions (not the current session). The audited record contains:Name of the userType of
the operationObject...
nareshg_009

Dec 20th, 2007

Can you pls explain it a bit clearlyThanks in advance


Answer Question Select Best Answer

AUG

072008

10:50 AM

4732
Views

6
Ans

Debug PL/SQL Code


o

chinnuchaitu

PL/SQL Interview Questions

How will you debug PL/SQL Code?


geek.hari

Dec 14th, 2009

One conventional and popular method of debugging a pl/sql code is through printing the
program execution path using a printable statement. For this you have to enable the output
mode using the command...
OraclePassport

Apr 17th, 2009

The Best way to debug is by using an AUTONOMOUS TRANSACTION. Create a dummy


table and insert into the table using the AT. This wont affect the main code, but one could
know which part of the code the execution has reached while the program is running itself.
Answer Question Select Best Answer

OCT

152009

04:25 AM

1323
Views

1
Ans

Select Multiple Information


o

knows

PL/SQL Interview Questions

How to select multiple data from different tables which do not have related constraints?
bhagavatula

Dec 10th, 2009

It is not necessary to have 'related constraints' between tables to retrieve data from multiple
tables. However, there should be a logic to associate data between the tables (related
data) based on which you can select information from multiple tables
Answer Question Select Best Answer

152007

MAY

01:41 AM

1593
Views

1
Ans

What will be the impact of replacing an API call with a stored


PL/SQL call?
o

rishamjeet

PL/SQL Interview Questions

godsrikanth

Dec 3rd, 2009

Difference is in performance. API is a package call which will process faster since its
already compiled. It can be called globally. Stored PL/SQL call is not compiled into
memory and may take more time.
Answer Question Select Best Answer

MAR

07:03 AM

292007

4602
Views

2
Ans

Why we use instead of trigger. what is the basic structure of the


instead of trigger. Explain specific business reason of it's use
o

globalanil18

PL/SQL Interview Questions

berly.george

Dec 1st, 2009

Instead of triggers are used:1) To control the DML operations on


Views(Insert/Update/Delete)2) Makes the non updatable views updatable
hindol_saha

Apr 9th, 2007

Conceptually, INSTEAD OF triggers are very simple. You write code that the Oracle server
will execute when a program performs a DML operation on the view. Unlike a conventional
BEFORE or AFTER trigger...
Answer Question Select Best Answer

MAR

212006

04:15 AM

9773
Views

5
Ans

When we need to use USING clause in the sql?For example in


this below:SELECT emp_name, department_name, city FROM
employees e JOIN departments d USING (department_id) JOIN
locations l USING (location_id) WHERE salary > 10000; Can
anyone explain what is mean of USING in this sql statement? or
USING concept in brief? Thank you.
o

michelle

PL/SQL Interview Questions

hmounir

Nov 17th, 2009

In natural joins USING clause can be used to specify only those culomns that should be
used for an equijion
ravikumarzee@gmail.com

Mar 9th, 2007

USING is also used while executing Dynamic SQL.e.g.,EXECUTE IMMEDIATE 'DELETE


FROM dept WHERE deptno = :num'
USING dept_id;

Sort by:
Answers
|
Date
Jump to Page:
13

APR

212008

03:27 AM

4327
Views
3
Ans

Global Temporary Table


o

ravishing_sid

PL/SQL Interview Questions

What is Global temporary table? and what are the benefits of it?
vanishavadlya

o
Oct 24th, 2009
The data in a global temporary table is private, such that data inserted by a session can only be
accessed by that session. The session-specific rows in a global temporary table can be preserved for
t...
taya_ronak

o
Nov 3rd, 2008
Global temporary table is kind of temporary table managed by system. it'll keep in temporary
tablespace till the session remain. there are two methods available i.e.1) create global temporary table
t1...
Answer Question

JUL

Select Best Answer

182006

10:03 AM

3635
Views
6
Ans

What can be the Maximum size of a plsql block?


o

Natesh

PL/SQL Interview Questions

jabir.mkk

Oct 16th, 2009

The maximum parsed/compiled size of a PL/SQL block is 64K and the maximum code size is 100K.
You can run the following select statement to query the size of an existing package or procedure.
SQL> select * from dba_object_size where name = 'procedure_name'
malik.aman

o
Dec 1st, 2007
Select * from dba_object_size where name = 'procedure_name';
Answer Question

FEB

Select Best Answer

152006

12:34 PM

4574
Views
4
Ans

What is the difference between all_ and user_ tables ?


o

Shweta_faqs

PL/SQL Interview Questions

pawan_kr2007

o
Oct 11th, 2009
ALL_OBJECTS: Objects accessible to the user.USER_OBJECTS: Describes all objects owned by
the current user.DBA_OBJECTS: Describes all objects in the database.
krishnaindia2007

o
May 7th, 2008
The information available in data dictionary tables is very difficult to understand. So it provides
views in a form that is easily understood by users. All these views are owned by sys. Oracle
provid...
Answer Question

OCT

Select Best Answer

292007

02:48 PM

2272
Views
2
Ans

Oracle extract records from temporary table


o

Ramesh Venkatesan

PL/SQL Interview Questions

Assume that I am using a temporary table in a procedure and I am inserting records and updating
another set of records through Merge statement. If I use cursor in that temporary table, How can I
extract all of the records from temporary table at the end of the stored procedure. Can you please
give coding for this.
johnjerry

o
Oct 7th, 2009
Make sure you do not COMMIT* in the middle of the procedure. You can do any number of
insertion into and deletion from temporary table and use "Select * from temp_table" to fetch a...
priyanka jolly

o
Nov 24th, 2007
Create Global temporary tables and say on commit preserve rows. The global temporary tables have
data available till the session is active. So you if you insert it at one procedure and want to access it
somewhere else you can do that very easily till the session is activeThanks Priyanka
Answer Question

JUN

Select Best Answer

082008

09:43 AM

2234
Views

2
Ans

Referenced and Dependent objects


o

KD09714

PL/SQL Interview Questions

How oracle manages dependency between referenced and dependent objects ?


johnjerry

o
Oct 7th, 2009
We can set REMOTE_DEPENDENCIES_MODE inside init.ora parameter file to TIMESTAMP or
SIGNATURE.ALTER SYSTEM SET REMOTE_DEPENDENCIES_MODE = [TIMESTAMP|
SIGNATURE]
YugundharK

o
Oct 13th, 2008
Oracle manages dependency between referenced and dependent objects by using 2 modes1.
Timestamp mode2. Signature mode
Answer Question

Select Best Answer

092004

SEP

06:04 AM

4381
Views
9
Ans

What is a cursor ? Why Cursor is required ?


o
o

PL/SQL Interview Questions

Cursor is a named private SQL area from where information can be accessed. Cursors are
required to process rows individually for queries returning multiple rows.
rahulg5211

o
Oct 4th, 2009
Cursor is an small memory allocation or workstation where operation or processing is done on the
data.Types of attribute of cursor are-:1)ROWCOUNT2)ISOPEN3)FOUND4)NOTFOUND
krishnaindia2007

o
May 6th, 2008
Oracle uses work areas called private SQL area to Execute Sql statements and store information. A
cursor is a mechanism by which we can assign name to that private sql area , th...
Answer Question

Select Best Answer

092004

SEP

06:04 AM

33119
Views
9
Ans

What is PL/SQL ?
o
o

PL/SQL Interview Questions

PL/SQL is a procedural language that has both interactive SQL and procedural
programming language constructs such as iteration, conditional branching.
surya72446

o
Sep 30th, 2009
PL/SQL stands for procedural languages extensions to SQL and it's theme is to hold a bunch of SQL
statements as a single function and return a single output.PL/SQL is advantageous compared to other
pr...
g_sidhu

o
Feb 16th, 2008
PL/SQL is the procedural extension to SQL with design features of programming languages. Data
manipulation and query statements of SQL are included within procedural units of code. PL/SQL
offers moder...
Answer Question

AUG

Select Best Answer

182008

04:44 AM

2761
Views
4
Ans

Indexed Select Statement


o

bmsrao

PL/SQL Interview Questions

How can we find the select statement is indexed or not?


Read Best Answer

Editorial / Best Answer


promisinganuj

Member Since Sep-2009 | Sep 13th, 2009

1. using AUTOTRACE
SQL> SET AUTOTRACE ON TRACEONLY
SELECT *
FROM emp
WHERE emp_name = 'ABC';
2. Using EXPLAIN PLAN
SQL> EXPLAIN PLAN for
SELECT *
FROM emp

WHERE emp_name = 'ABC';


The advantage of using EXPLAIN PLAN over the AUTOTRACE is that former does not require the
query to be actually run. The TRACEONLY option in AUTOTRACE just supress the query ouput
but the query still runs before the explain plan is displayed.
promisinganuj

o
Sep 13th, 2009
1. using AUTOTRACESQL> SET AUTOTRACE ON TRACEONLYSELECT * FROM
emp WHERE emp_name = 'ABC';2. Using EXPLAIN PLANSQL> EXPLAIN PLAN forSELECT
* FROM...
praveen_geek123

o
Sep 4th, 2008
Use "Explain Plan" command
Improve Answer

AUG

172008

06:52 AM

3229
Views
4
Ans

Retriving Multiple Records


o

bmsrao

PL/SQL Interview Questions

Why PL/SQL does not support retriving multiple records?


Read Best Answer

Editorial / Best Answer


promisinganuj

Member Since Sep-2009 | Sep 13th, 2009

Retriving multiple records is a basic feature of SQL where we fetch the data using SELECT
statement.
SELECT *
FROM emp;
This itself gives us multiple records. There is no additional feature required to do the same in
PL/SQL.
At the same time, PL/SQL goes one step further and enable us to process these fetched rows one by
one (unlike the update statements which updates all the rows selected).
There are several options for fethcing data in different PL/SQL constructs:
1. Using Ordinary Cursor
2. Using Ref Cursor
3. Using PL/SQL bulk collect
4. Using PL/SQL arrays
But the important thing here is that irrespective of the way we fetch the data, we act upon them rowby-row.
promisinganuj

o
Sep 13th, 2009
Retriving multiple records is a basic feature of SQL where we fetch the data using SELECT
statement.SELECT * FROM emp;This itself gives us multiple records. There is no additional feature
requir...
Mad Hatter

o
Nov 4th, 2008
Multiple records at a time could be retreved in PL/SQL using BULK COLLECT.To do that you
define PL/SQL table, and load it using SELECT ... BULK COLLECT INTO <pl/sql table>FROM
..Optionaly could ...
Improve Answer

OCT

052008

12:01 AM

2829
Views
2
Ans

Handle Multiple Rows Without Loops

jaalioracle

PL/SQL Interview Questions

How can we handle multiple rows without using loops in PL SQL?


sen_sam86

o
Aug 18th, 2009
This can be done by a function called TABLE FUNCTION by means of this you can return more
number of rows and columns this is more effective than using ref cursorregards sen-prakash
rajivgupta780184

o
Oct 31st, 2008
If we want to return multiple row from a function then we can use ref cursor function .Example is
given below: create or replace function f1 return sys_refcursor as r1 sys_refcursor;begin open r1 fo...
Answer Question

APR

Select Best Answer

192007

06:06 AM

2163
Views
3
Ans

What are the file utilit comands used in PL/SQL procedures?


o

kartheek

PL/SQL Interview Questions

samareshp

o
Aug 3rd, 2009
UTL_FILEThe Oracle supplied package UTL_FILE can be used to read and write files that are
located on the server. It cannot be used to access files locally, that is on the computer where the client
is ...
g_sidhu

Feb 5th, 2008

With the Oracle-supplied UTL_FILE package, you can read from and write to operating system files.
It Provides security for directories on the server through the init.ora file. UTL_FILE Procedures
and ...

Answer Question

JUL

Select Best Answer

122007

05:46 AM

2196
Views
3
Ans

What is the difference between using IS and AS while creating a


procedure, function package and package body?
o

Rohith

PL/SQL Interview Questions

Lakshmi84

o
Aug 4th, 2009
There is no difference btwn IS and AS while creating procedure,function,package
samareshp

o
Aug 3rd, 2009
Don't think there is any difference
Answer Question

Select Best Answer

092004

SEP

06:04 AM

5373
Views
6
Ans

What are the cursor attributes used in PL/SQL ?


o
PL/SQL Interview Questions

%ISOPEN - to check whether cursor is open or not % ROWCOUNT - number of rows


fetched/updated/deleted. % FOUND - to check whether cursor has fetched any row. True if
rows are fetched. % NOT FOUND - to check whether cursor has fetched any row. True if no
rows are featched.These attributes are proceeded with SQL for Implicit Cursors...
Lakshmi84

o
Jul 31st, 2009
%ISOPEN - To check whether cursor is open or not.Returns true if cursor or cursor variable is open
or not otherwise false.%FOUND - To check wheteher cursor is found or not. Returns true if fetch
re...
samareshp

o
Jul 30th, 2009
There are five cursor attributes: %isopen, %found, %notfound, %rowcount and %bulk_rowcount.
%isopenWith %isopen it is possible to test whether a cursor was opened: %found%found returns true
when the la...
Answer Question

Select Best Answer

142008

MAY

04:03 PM

6297
Views
8
Ans

Function return more than one value


o

satyam_Ora

PL/SQL Interview Questions

Hi,My questions is " Can function return more than one value".I have gone through the all
answers relevant to my question was been posted earlier. But all answers are confusing me.Few
people said directly that function can't return more than one value and few are telling that
function can return more that one value using OUT parameter or ref cursor.My understanding is
if out can't use as a parameter...
sen_sam86

o
Jul 23rd, 2009
Yes this can be possible by TABLE FUNCTION STEP - 1 CREATE TYPE ex_tabl_fun_obj AS
OBJECT (emp_name varchar2(20), emp_id NUMBER(2));STEP - 2 CREATE TYPE ex_tabl_fu...
javedans

o
Jul 8th, 2009
Its a universal truth that function can return only one value, but there are some tricks by using that
you can get more than one value , while function returning only one value.When you define functio...
Answer Question

Select Best Answer

262008

SEP

02:33 AM

2657
Views
1
Ans

SQL Query Tuning Considerations


o

ramesh.akula9

PL/SQL Interview Questions

While tuning SQL query what should be taken into consideration?


edarasatish

o
Jun 23rd, 2009
During the SQL tuning, there couple of things need to be considered1. If it is below Oracle 9i we
need make sure about the driving table concept (Since it uses RBO - Rule Based Optimization),
which im...
Answer Question

Select Best Answer

022006

MAY

05:26 AM

2610
Views
5
Ans

What is the purpose of NVL2?


o

Bvreddy

PL/SQL Interview Questions

r.kothandaraman

o
Jun 13th, 2009
We can set all the null value columns to some other values after that we can get all the corresponding
rows and columns of the table.
mala321

o
Dec 24th, 2007
Hello,NVL2 function is used to substitute a value for an expressionNVL2(string, value_if
_not_null_value, value_null_value) if the string contains a null vlaue ...
Answer Question

MAR

Select Best Answer

032006

06:38 AM

6722
Views
4
Ans

What is p-code and sourcecode ?


o

Naresh

PL/SQL Interview Questions

grajeshkumar82

o
Jun 9th, 2009
PCode is the parsed Code of the Procedure which is ready forexecution... This is the code that is
loaded into the shared pool andexecuted for you.
g_sidhu

o
Jan 31st, 2008
Source code is the Text of the procedure.It is accessed from USER_SOURCE data dictionary view.Pcode is Compiled object code which is not accessible.
Answer Question

JUN

Select Best Answer

302008

02:11 AM

2513
Views
2
Ans

RollForward

kondla

PL/SQL Interview Questions

What is the rollforward in pl/sql


Madhu_Das

o
May 21st, 2009
Rollforward is to Redo, as Rollback is to undo.
goelumesh

o
Jul 1st, 2008
Roll forward refers to the process Oracle goes through to apply changes contained in the redo log
files (both online and archive). The database clock (as measured by the system change number) is
moved...
Answer Question

JUN

Select Best Answer

262008

06:53 AM

2507
Views
2
Ans

Return statement and OUT Parameters


o

ramyaselvi16

PL/SQL Interview Questions

What are Return Statement and OUT Parameter in PLSQL Function?


Database Steve

o
May 20th, 2009
Functions always return a value.Procedures do not.The use of IN, OUT, and IN_OUT parameters as
scalar values or ref cursors is dependent on your need and overall performance not on a pseudostandard as answered above.

KD09714

o
Jun 28th, 2008
Function must have return statement by which it returns one value.Though we can use out parameter
in function(function not getting called from select statement or DML), it is not good programming
prac...
Answer Question

DEC

Select Best Answer

162005

04:42 AM

4979
Views
18
Ans

Why Functions are used in oracle ?Can Functions Return more


than 1 values?Why Procedures are used in oracle ?What are the
Disadvantages of packages?What are the Global Variables in
Packages?
o

sandeep kelkar

PL/SQL Interview Questions

ravivenkat1234

o
Apr 28th, 2009
Functions can have multiple out Parameters one with Return Parameter and others can be IN OUT
Parameter to the function. this way a function can return multiple out parameters.Eg : Function ( a in
num...
krishnaindia2007

o
May 7th, 2008
1.Functions are used to computer a value.2.Function can return more than one value using out
parameter. But it is not a good practice to return more than one value in functions.3.Proced...

Sort by:
Answers
|
Date
Jump to Page:
14

FEB

252007

09:04 PM

1597
Views
2
Ans

Explain, Is it possible to have same name for package and the


procedure in that package.
o

sri

PL/SQL Interview Questions

samareshp

o
Apr 22nd, 2009
Yes its possible.
bhushan_nemade

o
Feb 26th, 2007
Yes, its possible to have same name for package and the procedure in that package.
Answer Question

Select Best Answer

092004

SEP

06:04 AM

13239
Views
4
Ans

What is an Exception ? What are types of Exception ?


o
o

PL/SQL Interview Questions

Exception is the error handling part of PL/SQL block. The types are Predefined and user
defined. Some of Predefined exceptions are.
CURSOR_ALREADY_OPEN
DUP_VAL_ON_INDEX NO_DATA_FOUND TOO_MANY_ROWS
INVALID_CURSOR ...
samareshp

o
Apr 17th, 2009
Hi all, Exception is nothing but Error. Exception can serve as an ALERT message also. (using
RAISE_APPLICATION_ERROR)There are two types of exceptions: 1> Pre-defineddefine exception
(2&g...
Lavanya Chowdary

o
May 6th, 2007
Exception is nothing but error in the PL/SQL program. If any error occured in the PL/SQL program
that terminates from the program. To handle that exceptions we are using exception handling part in
the...
Answer Question

OCT

Select Best Answer

202008

02:39 PM

10683
Views

5
Ans

Procedure Parameters
o

arunnaa

PL/SQL Interview Questions

What is call by value and call by reference in parameters (IN, OUT, INOUT)?
Read Best Answer

Editorial / Best Answer


lisha.varghese

Member Since Nov-2008 | Nov 16th, 2008

Three types of parameter modes


1) IN parameter mode- This mode is used to pass values to the calling module when invoked.The
value of IN parameter can't be changed in the module.
2) OUT parameter mode -This mode is used to return a value to the main block.The value of OUT
parameter can change anywhere in the program.
3)IN OUT parameter mode-This mode is used to pass values to the calling module and return a value
to the main block.The value of IN OUT parameter can change anywhere in the program.
In Call By value ,the copy of actual parameter is passed to the formal parameter,So any changes to
the formal parameter doesn't affect the actual parameter.
In Call By reference,the address of actual parameter is passed to the formal parameter,so any changes
to the formal parameter will change the actual parameter also,because both of them are pointing to
the same memory location.
Here no copying is required.
The IN parameter is passe by reference,so we can't change the value of IN parameter inside the
module,It acts as a constant,But the OUT and IN OUT parameters are passed by value,we can change
the values of OUT & IN OUT paremeters
samareshp

o
Apr 17th, 2009
In Parameter:: call by reference OUT Parameter: call by valueIN OUT Parameter: call by valueif you
use the hint NOCOPY with OUT Parameter and IN OUT Parameter then ::: call by reference

lisha.varghese

o
Nov 16th, 2008
Three types of parameter modes1) IN parameter mode- This mode is used to pass values to the
calling module when invoked.The value of IN parameter can't be changed in the module.2) OUT
parameter mo...
Improve Answer

FEB

092006

02:55 AM

2146
Views
2
Ans

Can i write plsql block inside expection


o

rajat

PL/SQL Interview Questions

samareshp

o
Apr 15th, 2009
Sure, you can write plsql block inside exception.
Rupjit Roy

o
Feb 23rd, 2006
Yes you can write PL/SQL block inside exception section. Suppose you want to insert the exception
detail into your error log table, that time you can write insert into statement in exception part. To ...
Answer Question

JAN

09:23 AM

Select Best Answer

312006

2620
Views
10
Ans

What are the restrictions on Functions ?


o

Shweta_faqs

PL/SQL Interview Questions

samareshp

o
Apr 15th, 2009
Function having a return type as Boolean ,can't be used in select statement.
krishnaindia2007

o
May 7th, 2008
In functions we can use all three types of parametershere is a simple exampleCREATE OR
REPLACE FUNCTION TEST_FUNC(A IN NUMBER, B IN OUT NUMBER,C OUT NUMBER)
RETURN NUMBER IS &n...
Answer Question

FEB

Select Best Answer

182009

12:06 AM

1920
Views
1
Ans

Auto Commit
o

sandeep_sb4

PL/SQL Interview Questions

When we insert new values into the table using loops. Is it going to be auto commit or do we
need to commit manually?
chaitra murthy

o
Mar 19th, 2009
All the DML statement requires manual commit where as DDL statements are autocommitted.
Answer Question

MAR

Select Best Answer

012007

02:29 PM

2546
Views
5
Ans

Without closing the cursor, If you want to open it what will


happen. If error, get what is the error?
o

ddkdhar

PL/SQL Interview Questions

msenthil19

o
Mar 18th, 2009
Error will be like "Cursor already open"
ratna82

o
Oct 10th, 2008
CURSOR_ALREADY_OPEN ORA-06511 An attempt was made to open a cursor that was already
open.
Answer Question

JUN

Select Best Answer

202008

08:43 PM

2505
Views
4
Ans

Debug PL SQL
o

ramyaselvi16

PL/SQL Interview Questions

How can we generate debugging output from PL/SQL?


kperumal75

o
Feb 24th, 2009
Use "SHOW ERRORS" command.Regards,Karthik
KD09714

o
Jun 28th, 2008
Stshekhar is right, oracle supplied package DBMS_OUTPUT with procedures PUT, PUT_LINE,
NEW_LINE etc in case of debugging pl/sql
Answer Question

JUL

Select Best Answer

172008

10:02 AM

2456
Views
4
Ans

About dbms_output.put_line( ) package


o

usrkraju

PL/SQL Interview Questions

What is the maximum size of the message that we can give in dbms_output.putline();
kantri

o
Dec 15th, 2008
The maximum size of package is 32kWe can't give more than that
jp_valapad

o
Aug 5th, 2008
255 bytes was the size limits of earlier version of oracle..ie prior to 10 g ..in 10g 32767 byte is the
limit..
Answer Question

JAN

Select Best Answer

312008

05:31 AM

1292
Views
2
Ans

Passing the parameter to TOP keyword


o

sumanreddymca

PL/SQL Interview Questions

Hi All,I want create a stored procedure by passing the parameter to top nth recordfor Excreate
proc test1(@x integer)asbeginselect top @x empid from emp order by empid descendwhen iam
executing iam getting error .Please let me know any other alternative way
shruti.potdar

o
Dec 10th, 2008
Solution to your problem:Create Procedure TEST1( p_num number)isv_eid number;begin select
empid into v_eid from EMPwhere empid=(select A.empid from (SELECT empid, rank() over (order

by empid desc) RNK FROM emp) A where A.RNK=p_num);dbms_output.put_line('Top'|| p_num ||


'emp is ::'|| v_eid);End;/
xambrose

o
Jul 19th, 2008
create proc test1(@x integer)asbeginSELECT empid FROM (SELECT empid FROM emp
ORDER BY empid ) WHERE ROWNUM = @x;end
Answer Question

MAR

Select Best Answer

012007

02:43 PM

5843
Views
2
Ans

What is PRAGMA RESTRICT_REFERENCES:


o

ddkdhar

PL/SQL Interview Questions

saishradha

o
Dec 3rd, 2008
Pragma RESTRICT_REFERENCES is a compiler directive.It makes sure that the function maintains
the purity rules and code in fuction creation satisfy the purity rules.There are 4 values for
it.WNDS,RNDS,WNPS,RNPS.ThanksJai Sainath
Kullai Naidu

o
Mar 5th, 2007
By using pragma_restrict_references we can give the different status to functions,Like
WNDB(WRITE NO DATA BASE),RNDB(read no data base),Write no package state,read no packge
state.W
Answer Question

Select Best Answer

262006

MAY

05:23 PM

9350
Views
7
Ans

What is the difference between In, Out, InOut Parameters. Can we


pass value or reference or both to the In Out Parameter.
o

sbagai2001

PL/SQL Interview Questions

saishradha

o
Nov 26th, 2008
Here is the answer in 1 lineIN-- value is used in a program.
It cannot be a variable .COuld be
literal,expression,value .OUT-- value is returned back from the progr...
raghav_sy

o
Jan 15th, 2007
hi friends,To make it simple, keep in mind,IN : It is a CONSTANT in the sub-program and u can not
modify its value in subprogram. if its value is modified in the s...
Answer Question

NOV

Select Best Answer

252008

11:30 PM

1658
Views
1
Ans

BulkBind
o

bhaskar_1977

PL/SQL Interview Questions

What Is BulkBind? When it is used?


saishradha

o
Nov 26th, 2008
Bulk Bind is the facilty through which we can INSERT, UPDATE, DELETE or SELECT from
records from a table in bulk rather than multiple individual statments..Suppose you have 10 inserts to
be made so yo...
Answer Question

JUN

Select Best Answer

182006

11:02 AM

1538
Views
7
Ans

How do i write a function that returnsmore than 1 records from a


tablefor example in sql server there is a solution as create
function f1() return table asselect * from emphow do i do the
same in oracle. plz help
o

vssandilya

PL/SQL Interview Questions

rajivgupta780184

Nov 24th, 2008

If we want to return multiple row from a function then we can use ref cursor function .Example is
given below: create or replace function f1 return sys_refcursor as r1 sys_refcursor;begin open r1
for ...
pardhu323

o
Jul 20th, 2008
create or replace function f1 return sys_refcursor as r1 sys_refcursor;begin open r1 for select * from
emp; return(r1); end;call the funtion as :select f1 from dual;then it returns :CURSOR
STATEMENT :...
Answer Question

Select Best Answer

222008

SEP

10:24 PM

3593
Views
1
Ans

Send Email from Oracle Procedure


o

p_pramanik123

PL/SQL Interview Questions

How to send Email via PL/SQL Procedure?


rajivgupta780184

o
Nov 24th, 2008
rem -----------------------------------------------------------------------rem Filename: smtp.sqlrem
Purpose: Send e-mail messages from PL/SQLrem Notes: ...
Answer Question

NOV

11:52 PM

Select Best Answer

222007

2112
Views
5
Ans

Which two statements are true?A. A function must return a


value.B. A procedure must return a value.C. A function executes
a PL/SQL statement.D. A function is invoked as part of an
expression.E. A procedure must have a return Data
o

Ramanjaneyulu

PL/SQL Interview Questions

ammupriyaa

o
Ans : A & D

Nov 20th, 2008

AshfaqueS

o
A and D

Nov 20th, 2008

Answer Question

OCT

Select Best Answer

172006

02:37 PM

1363
Views
6
Ans

Suppose, I've created a new database DB1 n i've created a table


DB1.T1.Now, DESC T1 --> desplaying the table structure
butselect * from DB1.T1 ---->giving--> table or view does not
exist.. Can any one explain possible reason behind this.
o

shamim909

PL/SQL Interview Questions

todeepakmalhotra

o
Nov 10th, 2008
You cannot use the database name before the table name like db1.t1.we can only use a user
name and then table name. eg. let we have a user "deepak" then we can write select * from
deepak.t1 . We ca...
oozaifa

o
Nov 6th, 2008
Type schema name before table name or your id dont have the access to view the data from that table
Answer Question

Select Best Answer

172008

SEP

09:52 AM

3199
Views
1
Ans

Call PL/SQL function


o

ramesh.akula9

PL/SQL Interview Questions

How to call a PL/SQL function in another PL/SQL function? Is it possible? Give example?
Jirange

Nov 7th, 2008

Eg,create or replace fun_1 return varchar2asddmmyy varchar2;beginselect sysdate into ddmmyy


from dual;end fun1;in above example function fun_1 calling another function (i.e. sysdate) thro'
select statement. this way you can call any function in pl/sql function

Answer Question

JUL

Select Best Answer

162008

02:38 PM

2204
Views
2
Ans

Is the order in which the conditions are given in the 'WHERE'


clause are important?
o

babhatti

PL/SQL Interview Questions

Mean I heard from Oracle 8i onwards the order of where clause condition does not matter
which oracle creates the explain plan...and execute..Is it true?
manoj_behera82

o
Aug 7th, 2008
Yes the order is important. But it is important for the performance of the query and not for the final
result. The output of the query will be the same irrespective of the order in which the join con...
gtomar

o
Aug 7th, 2008
Hi, Where Clause conditions execution are independent of order in explain plan but it reads top to
bottom.Thanks,Gunjan
Answer Question

AUG

Select Best Answer

272008

03:27 AM

2846
Views
3
Ans

Return Multiple Rows


o

ramesh.akula9

PL/SQL Interview Questions

How to return more than one row through functions? Explain with example.
rajivgupta780184

o
Oct 31st, 2008
create or replace function f1 return sys_refcursor as
r1 sys_refcursor;
begin open r1 for select * from emp;
return(r1);
end;
call the function as: select f1 from dual;
Thanks & Regards
RAJIV GUPTA (ORACLE CONSULTANT)
YOGIK TECHNOLOGIES PVT LTD.
raghuprasad

o
Sep 1st, 2008
Eg: SELECT empname,sal
FROM employee_table
sal>MIN(sal);Hope the above statement executes.

092008

MAY

01:59 PM

4747
Views

WHERE sal<MAX(sal) AND

5
Ans

Find Sequence MAX Value


o

pc_mts

PL/SQL Interview Questions

How to find the max value in a Sequence?


mstreete

Sep 29th, 2008

If you don't own the sequence, you may look at all_sequences, which shows sequences in
other schemas that you have access to:select max_valuefrom sys.all_sequenceswhere
sequence_owner = '&sequence_owner' and sequence_name = '&sequence_name'
nandk.sharma

Jun 30th, 2008

We can get the MAX value of a sequence by using the data dictionary view
'USER_SEQUENCES' .i.e. SELECT MAX_VALUE FROM USER_SEQUENCES
WHERE SEQUENCE_NAME='NAME_OF_SEQUENCE'
Answer Question Select Best Answer

SEP

052008

07:09 AM

1720
Views

1
Ans

External Table
o

ramesh.akula9

PL/SQL Interview Questions

Define External Table


lanka_satya

Sep 12th, 2008

it is same as oracle table but act as view to the data available in an external file of a
physical drive,so here we can query the data and retrieve and can do anything but cannot
do manupulations on the data
Answer Question Select Best Answer

MAR

012007

02:29 PM

4884
Views

7
Ans

In PL/SQL if we write select statement with INTO clause it may


return two exceptions NO_DATA_FOUND or TOO_MANY_ROW .
To do you avoid these execeptions. How do you write SQL
statement in alternative way?
o

ddkdhar

PL/SQL Interview Questions

vnraos

Sep 5th, 2008

First, let us understand why these errors cropup.1) NO_DATA_FOUND - is raised only for
"select into" statements when the where clause of the query does not match any
rows.2)TOO_MANY_rows - is raised...
binurajnair

Jul 30th, 2008

If you don't want an excpetion to be raised on a SELECT statement, you can avoid
executing the statement by having a count just before the SELECT as shown
belowSELECT count(rowid)into v_count from...

Answer Question Select Best Answer

192008

JUL

02:48 PM

6015
Views

2
Ans

How to take DATE as user input in PL/SQL block?


o

NIKKI_PRIYAL

PL/SQL Interview Questions

raghuprasad

Aug 25th, 2008

Inputting the date in PL/SQL is same as in SQL. Simply pass the date as a string in the
format DD-MON-YYYY.Eg: SELECT * FROM TABLE WHERE HIRE_DATE='dd-monyyyy'.OrYou can also use Date functions TO_DATE('25-aug-2008','......date
formate......');Hope this is the answer, you are looking for.Raghu.
rajivgupta780184

Aug 22nd, 2008

Create or replace function get_period (pDate varchar2) return varchar2is pday


varchar(20);begin SELECT TO_CHAR(to_date('&DATE','MM/DD/YYYY'),'DAY') into pday
FROM DUAL;return pday;end get_period;to call the function select get_period(08/03/2008)
from dual;
Answer Question Select Best Answer

AUG

09:26 AM

192008

2561
Views

0
Ans

Better Tunning PL/SQL Blocks


o

jkverma29

PL/SQL Interview Questions

What steps should a programmer should follow for better tunning of the PL/SQL blocks?
Answer Question

252007

MAY

10:15 AM

1831
Views

1
Ans

How to reduce the the burden/main memory on database if i am


using refcursor to hold large data to increase performance.
o

monu

PL/SQL Interview Questions

durgadas.menon

Aug 13th, 2008

Unlike tables ref cursors do not store data. They act like mold to hold data during the
execution of the piece of code so proper coding and use of bind variables can help
decrease the burden of proces...
Answer Question Select Best Answer

152008

JUL

10:20 AM

1085
Views

1
Ans

Job scheduling
o

ramesh.akula9

PL/SQL Interview Questions

How can i schedule a procedure every day at 10 pm


rajivgupta780184

Aug 13th, 2008

This is the sample code you have to adjust time according to your requirementSET
AUTOPRINT ONVAR jobno NUMBER;BEGIN DBMS_JOB.SUBMIT(:jobno, 'JOBNAME;',
TRUNC(SYSDATE) + 6/24, 'TRUNC(SYSDATE + 1) + 6.183/24'); COMMIT;END;
ThanksRajiv
GuptaYogik Technologies Pvt. Ltd.
Answer Question Select Best Answer

OCT

062007

08:39 AM

1321
Views

6
Ans

How to add XL Sheet in PL/SQL?


o

shasi

PL/SQL Interview Questions

rajivgupta780184

Aug 12th, 2008

By using SQL LOAER, TOAD we can insert EXCEL file data into respective Table & we
can also create or upload ORACLE table data to .xls file from that.ThanksRajiv
GuptaYogik Technologies Pvt. Ltd.
rudhra97

Jul 24th, 2008

By using sql*loader tool,we can convert flat files into oracle tables
Answer Question Select Best Answer

FEB

162006

10:31 AM

1003
Views

7
Ans

In PL/SQL I need to get like this scenario. if I am doing


manipulation on a table, I need to display a record as NonUpdateable. It need to show a message to the user. How it is
possible.Thanks in Advance.
o

murthy

PL/SQL Interview Questions

rajivgupta780184

Aug 12th, 2008

CREATE OR REPLACE TRIGGER SHOW_BEFORE_DMLBEFORE INSERT OR DELETE


OR UPDATE ON SERVICE_ORDER_STATUS --(TABLE NAME)FOR EACH ROW

BEGIN DBMS_OUTPUT.PUT_LINE('NON-UPDATABLE
TABLE'); ROLLBACK;END;ThanksRajiv GuptaYogik Technologies Pvt. Ltd.
SonuYadav

Aug 11th, 2008

You can user sql%rowcount to check whether the dml does something or notegbegindelete
from tbl_xxxwhere col_yyy = 'ASDF';dbms_output.put_line (sql%rowcount);end;this way it
will return the no of rows deleted
Answer Question Select Best Answer

AUG

172006

05:09 AM

997
Views

5
Ans

Hi,We have to select some rows from a table using many


conditions in the where clause. Then we have to write those
selected rows to one flat file. I know that we can use UTL_FILE
package to do this. Is there any better approach to do this??
o

Ritesh

PL/SQL Interview Questions

rajivgupta780184

Aug 12th, 2008

YOU CAN USE TEXT_IO.PUTLINE INBUILTSOR YOU CAN USE THE SPOOL
FUNCTION BOTH ARE APPLICABLE
hindol_saha

Mar 27th, 2007

Spool c:filename.txtselect * from tab where ................;spool off;goto c: and check it.i think it
is the easyest way to store some data from oracle to flat file...u can save it in any extension
like .csv.xls.txt ect............

Answer Question Select Best Answer

JUN

092008

03:50 AM

1290
Views

4
Ans

What are the advantages of packages ?


o

chengaiah

PL/SQL Interview Questions

laxma823

Aug 7th, 2008

Package have more advantages ModularityEasily Application designBetter


PerformenceInformation Hiding
nirajsingh78

Jun 27th, 2008

Reuse
Answer Question Select Best Answer

NOV

272006

06:25 AM

21334
Views

8
Ans

What are the advantages & disadvantages of packages ?


o

sanjay desai

PL/SQL Interview Questions

binurajnair

Aug 2nd, 2008

We can overload functions/procedures inside packages.


jagadeesh9

Feb 24th, 2008

Package: It is an collection of related variables, cursors,procedures and functions stored at


one location. They supports OOPS features like function over loading,
encapsulation.ADV: ...
Answer Question Select Best Answer

232008

JUL

02:35 AM

2119
Views

1
Ans

Filling a ref cursor


o

suash143

PL/SQL Interview Questions

How to fill a refcursor with dataset in C#.i want to pass a dataset as parameter and fill a refcursor with the
same dataset.
viv_mca

Jul 31st, 2008

you need to use ODP.Net connector.In OracleCommand object add OracleParameter object
with following propertiesOracleDbType = OracleDbType.RefCursor;Direction=
ParameterDirection.Output;give the name of your stored procedures's refcursor parameter
name
Answer Question Select Best Answer

APR

302008

04:39 PM

5441
Views

1
Ans

Analytical functions
o

Hsingh85

PL/SQL Interview Questions

What are analytical functions and how are they used?


singh.neerajin

Jul 22nd, 2008

Analytic functions compute an aggregate value based on a group of rows. They differ from
aggregate functions in that they return multiple rows for each group. The group of rows is
called a window and ...
Answer Question Select Best Answer

DEC

122006

05:50 AM

12315
Views

6
Ans

What is a NOCOPY parameter? Where it is used?


o

Richa Kulkarni

PL/SQL Interview Questions

PraGop

Jul 21st, 2008

Can u please give more explanation on this NOCOPY parameter


raghav_sy

Jan 15th, 2007

hi one more thing i wan to add abt NOCOPY, it is that its a hint to compiler, so its compiler
wish whether to follow this thing or not, so before using this just go through the conditions
when this th...
Answer Question Select Best Answer

152008

JUL

10:49 AM

1489
Views

1
Ans

How do you Optimize query


o

ramesh.akula9

PL/SQL Interview Questions

How can i choose which query is best?i.e On which factors i can choose the best query?
madanuprashanth

Jul 18th, 2008

By forcing the SQL engine to use indexes.If query is too much nested then break it into two
or three queries using temp tables and then write one query by joining these temp table to
perform the task.
Answer Question Select Best Answer

092008

MAY

02:12 PM

1078
Views

2
Ans

Long Raw Columns


o

pc_mts

PL/SQL Interview Questions

How many columns you can create in table from this type "long raw"?
krishnaveni_g

Jul 17th, 2008

We can use only one long column in a table


madhupriya.nukala

Jun 25th, 2008

Only single column is allowed per a table of data type LONG or LONG RAW
Answer Question Select Best Answer

FEB

02:18 PM

262008

2699
Views

1
Ans

ORA-01756: quoted string not properly terminated


o

nernernini

PL/SQL Interview Questions

Hi Can anyone explain what this mean? I have practise PL/SQL about REF obj_type, my codes are:
CREATE or REPLACE TYPE home_type AS OBJECT (street VARCHAR2(50), city VARCHAR2(20), state
VARCHAR2(20), zipcode VARCHAR2(6), owner VARCHAR2(10));/CREATE TABLE homes OF
home_type;INSERT INTO homes VALUES ('300 Regina St', 'WATERLOO', 'ON', '010010',
'HFWANG');INSERT INTO homes VALUES ('301 Regina St', 'WATERLOO',...
krishnaveni_g

Jul 15th, 2008

I checked the code it's working fine.


Answer Question Select Best Answer

052008

JUL

12:23 PM

2801
Views

2
Ans

Writing Pl/SQL function


o

csprusty

PL/SQL Interview Questions

Write a PL/SQL fuction named say TRUN, which does the same work as the oracle predefined function
"TRUNCATE".
ajaz_11i

Jul 9th, 2008

It will truncate/delete all the rows in the table emp very fast as compared of delete
command, but the table must have no Foriegn keyMr. Ajaz Ahmad Kumar
sgbang

Jul 7th, 2008

Hi,Please check out this function:create or replace function trun(p_table_name varchar2)


return number asbeginexecute immediate ' truncate table '|| p_table_name;return 0
;end; /How to ex...
Answer Question Select Best Answer

MAR

182008

01:35 AM

1826
Views

2
Ans

Temporary Tables
o

senthilkumard

PL/SQL Interview Questions

How to create temporary table? Give some example


ravi.8311

Jun 28th, 2008

Create table temp as select*from base table where 1=1;


venkat82.k

Mar 20th, 2008

Hi guys........Temporary tables means which tables are hold data temporarlyi mean these
holds the data certain time mainly only that session.exp:-create global temporary table
employ(emp_id number(10)...

Sort by:
Answers
|
Date
Jump to Page:
16

132008

MAY

06:43 AM

1702
Views
0
Ans

Set time for job


o

prashantjadhav5000

PL/SQL Interview Questions

How to set time in pl/sql(Toad) JOB


Answer Question

AUG

252006

11:00 PM

1270
Views

1
Ans

Pls send the interview qustions from pl/sql, sql, datawarehousing


questions.
o

sudha periasamy

PL/SQL Interview Questions

rampratap409

o
Oct 20th, 2006
You should put your question here. This forum is not a library. Please take care.
Answer Question

APR

Select Best Answer

302008

04:39 PM

1710
Views
1
Ans

Skip Columns with SQLLDR


o

Hsingh85

PL/SQL Interview Questions

How to skip columns while loading data with SQLLDR


lokeshRao

o
Jun 23rd, 2008
Specify Filler Load datatruncate into table empfields treminated by'|'(field1,field2 filler,field 3)
Answer Question

Select Best Answer

OCT

082007

09:46 AM

2431
Views
2
Ans

When to use collection types in PL/SQL?


o

Amit Navapara

PL/SQL Interview Questions

krishnaindia2007

o
Jun 23rd, 2008
Collection is an ordered group of elements all are of same time. Each element in the collection has
unique subscript to identify its position in the collection.Pl/sql offers three collection type...
ravgopal

o
Oct 10th, 2007
The following bullet points can be referred to when deciding what collection best suits a
particular solution .VarrayUse to preserve ordered list Use when working with a fixed set, with a
known number ...
Answer Question

OCT

Select Best Answer

302007

08:27 AM

1264
Views
3
Ans

What is Pragma ? How do we know that which ERROR code is


associate to what error ?
o

prabhatushar

PL/SQL Interview Questions

krishnaindia2007

o
Jun 23rd, 2008
Pragma is a compiler directive. It passes information to compiler. These are processed at compile
time not at runtime.
&nbs...
rajakumar_na

o
Nov 2nd, 2007
Pragma is a compiler directive. Using SQLCODE & SQLERRM we know that which ERROR code
is associate to what error.
Answer Question

Select Best Answer

122008

MAY

04:07 AM

1903
Views
1
Ans

Problem with Utl_file.fopen


o

Ananth.p

PL/SQL Interview Questions

Hi,There is problem with ult_file.fopen. When I run from the server side, there is no issue with
utl_file and it is working fine.If I run the same procedure from Client machine, I am facing
problem. It throws an exception Invalid_operation.I am usingOracle 8.2 and Unix server.Can

you please let me know what change needs to be done? Is this related to permission issue.Thanks
& Regards,Ananth P
stshekhar

o
Jun 22nd, 2008
the parameter set in configuration file init.oraand UTL_FILE_DIR belongs to the directory structure
in oracle server machine. And the directory structure should be on same machine as oracle server.
Th...
Answer Question

AUG

Select Best Answer

072007

05:02 PM

1313
Views
3
Ans

How to write a query or procedure or function to retrieve all the


tables from database where the table dont have any data (no
rows).
o

Robert

PL/SQL Interview Questions

Database has 100 tables and some of the tables dont have any data. I want to pullout those table
names from database in Oracle.
sr_2407

o
Jun 4th, 2008
Select table_name ,num_rows from user_tableswhere num_rows=0
ravgopal

o
Oct 10th, 2007
Analyze and perform statistics on whole schema. This will populate the statistics details about each
table. You can pull NUM_ROWS column from all_tables to check whether it ...

Answer Question

OCT

Select Best Answer

172007

07:25 AM

3668
Views
2
Ans

Oracle Cursor types


o

Raja

PL/SQL Interview Questions

What are the types of cursors apart from explicit and implicit cursors ? Explain when and where
they are used ?
krishnaindia2007

o
May 31st, 2008
There are only two types of cursors in oracle Pl/sql.1. Implicit cursors2. Explicit cursors
define an explicit cursor as static or dynamic (REF CURSOR). ...

We can

Manoharan

o
Oct 25th, 2007
1. Implicit Cursor2. Explicit Cursor3. Ref CursorImplicit Cursor like SQL%rowcount,SQL
%rowtype...Explicit cursors are user defined cursorRef Cursor is object name of the cursor type. Its
mainly used for dynamic purpose
Answer Question

FEB

03:56 PM

Select Best Answer

132008

3644
Views
1
Ans

Difference between 'TABLE OF' and 'REF CURSOR'


o

dgandhi

PL/SQL Interview Questions

What exactly the difference between 'TABLE OF' and 'REF CURSOR' in PL/SQL?For what
purposes these both might be used?
krishnaindia2007

o
May 31st, 2008
A ref cursor is a dynamic cursor in which the contents of cursor can be changed dynamically at run
time depending upon our requirement.A ref cursor is basically a data type. A variable declared
based ...
Answer Question

FEB

Select Best Answer

162008

04:52 AM

8596
Views
5
Ans

Oracle triggers
o

maheshveeragoni

PL/SQL Interview Questions

Can we issue rollback, commit in the trigger body. if we issue what is the result

Read Best Answer

Editorial / Best Answer


binurajnair

Member Since Feb-2008 | Feb 28th, 2008

An autonomous transaction is an independent transaction which can be committed independent of


other transactions. An autonomous transaction will be committed with out committing the other nonautonomous transactions are committed.
The following exercise will help you to understand the difference between autonomous and normal
transactions.
Create a table for the exercise.
create table test_table (a varchar2(50));
Create a non-autonomous procedure which will insert one row to this table.
CREATE OR REPLACE PROCEDURE non_autonomous_proc
IS
BEGIN
INSERT INTO test_table
VALUES
('Non Autnomous Insert');
COMMIT;
END;
Now execute the following code
DECLARE
BEGIN
INSERT INTO test_table
VALUES
('Before Non Autnomous Insert');
non_autonomous_proc;
INSERT INTO test_table
VALUES
('After Non Autnomous Insert');
ROLLBACK;
END;
Now query the table
select * from test_table;
As expected 2 rows will be retrieved
A
-------------------------------------------------Before Non Autnomous Insert
Non Autnomous Insert
Now we will see the case of autonomous transaction.
Clear the test_table

delete from test_table;


commit;
Create an autonomous procedure which will insert one row to this table.
CREATE OR REPLACE PROCEDURE autonomous_proc
IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
INSERT INTO test_table
VALUES
('Autnomous Insert');
COMMIT;
END;
Now Execute the following code
DECLARE
BEGIN
INSERT INTO test_table
VALUES
('Before Autnomous Insert');
autonomous_proc;
INSERT INTO test_table
VALUES
('After Autnomous Insert');
ROLLBACK;
END;
And query the table
select * from test_table;
This will show only one row
A
-------------------------------------------------Autnomous Insert
Conclusion
1) The commit statement in the autonomous procedure will commit the DML operations in the
autonomous procedure without commiting the transactions before that.
2) The rollback statement caused both the inserts before and after the autonomous transaction to be
rolled back, but not the autonomous transaction

krishnaindia2007

o
May 31st, 2008
We can use commit and rollback in trigers using autonomous transactions.- An atonomous
transaction is an independent transaction initiated by another transaction.- When an atonomous
transaction is cal...
arbind1982

Mar 12th, 2008

we can use commit or rolback in trigger without error by using "PRAGMA


AUTONOMOUS_TRANSACTION;" on declaration sectionCREATE TRIGGER
anniversary_triggerBEFORE INSERT ON employees FOR EACH RO...

Improve Answer

APR

162007

06:55 AM

1562
Views
4
Ans

What is difference between DESCRIBE and DESC please define


o

Amit kumar shukla

PL/SQL Interview Questions

ashishdixit

o
May 29th, 2008
desc has two meanings and depends on the usage.when used in sql plus as in the below stt.desc
<tablename>;it is taken as a sqlplus keyword and describes the table, dispalying column, constraints...
Sebastian Thomas

o
Aug 17th, 2007
DESC will display the values in DESCending order when used in an ORDER BY clause.For
example:SELECT * FROM empORDER BY empno DESC;
Answer Question

FEB

06:42 AM

Select Best Answer

242008

1764
Views
3
Ans

PL/SQL tables
o

jagadeesh9

PL/SQL Interview Questions

How will implement the PL/SQL tables?


krishnaindia2007

o
May 29th, 2008
- Pl/sql is in memory representation of a table.- It is just a data type. ( Collection type)- It may store
any number of rows from table.Here is a simple exampleCREATE OR REPLACE PROCEDURE
TEST_...
tonyrobert

o
Mar 27th, 2008
INDEX By Tables composed of two components1. Primary key of data type
BINARY_INTEGER2. Column of scalar or record data type.Since this table is unconstrained, it
can increase its size dynamically....
Answer Question

MAR

Select Best Answer

122008

02:33 AM

2508
Views
4
Ans

Example for calling procedure

ravenkumar

PL/SQL Interview Questions

Give an example for calling procedure with user and system exception
krishnaindia2007

o
May 29th, 2008
Simple example for predefined exception CREATE OR REPLACE PROCEDURE TEST_PROC AS
A NUMBER ; BEGIN A := 'TEST'; DBMS_OUTPUT.PUT_LINE('THE VALUE OF A = '||A);
EXCEPTION WHEN VALUE_ERROR ...
ravenkumar

o
Mar 17th, 2008
set serveroutput on;create or replace procedure proc1 (emp_id in emp.employee_id%type, emp_na
out emp.last_name%type, emp_sal out emp.salary%type, emp_job out emp.job_id%type) is &...
Answer Question

APR

Select Best Answer

102008

11:27 AM

2185
Views
4
Ans

PL/SQL Block output


o

Kanhucharan

PL/SQL Interview Questions

begin For i in 1..5 loop insert into A values(i); savepoint 1; end loop; rollback to savepoint 1;
commitend;--initially there are no data in table A. So my question is after execution of this block
what should be the data present in table A?
krishnaindia2007

o
May 29th, 2008
The first mistake in this code is savepoint 1;You can't give 1 as identifier. Identifier name must begin
with a letter.insert into A values(i);savepoint x;Here you are defining save...

satyam_Ora

o
May 6th, 2008
The flow of execution will be as below:step1: loop will execute 5 times and the variable value(i) will
store in the table a in series of values from 1 to 5.step2: all 5 values in series from 1..5 w...
Answer Question

JAN

Select Best Answer

312006

12:48 PM

1408
Views
3
Ans

How the execution will be done in exceptions?


o

ashwin.k

PL/SQL Interview Questions

ashishdixit

o
May 28th, 2008
Exception is equivalent of an error in the code.This may be due to incorrect data or wrong coding
techniques. What ever the reason may be,when an error occurs in the plsql code, the command
terminates...
praveen.pinisetti

o
Apr 6th, 2006
There is a lot to explain the execution of exceptions.Whenever error is occured,the corresponding
exception will be raised and handled in Exception block.But in the case of nested blocks,The
exception...
Answer Question

Select Best Answer

092004

SEP

06:04 AM

3020
Views
2
Ans

Write the order of precedence for validation of a column in a


table ?
o
o

PL/SQL Interview Questions

I. done using Database triggers.


ii. Exception :

ii. done using Integarity Constraints. I &

Srinatha Reddy

o
May 21st, 2008
create table a ( b number, c number check (c >100) );create or replace trigger t1 before insert on a
begindbms_output.put_line('this is before insert trigger'); end;create or replace trigge...
prashant

Jul 6th, 2006

ii. done using Integarity Constraints

Answer Question

APR

Select Best Answer

182007

05:28 AM

4378
Views
2
Ans

What is the difference between private packages and public


package . what is the difference in declaration of these 2
packages.
o

Chanukya Kumar

PL/SQL Interview Questions

mosam

o
May 20th, 2008
U can not create thr private packages in oracle becoze packages can not be nasted
KiranKW

o
May 2nd, 2007
hi , i dont think there is something called as public package / private package. But yes the methods
defined in a package can either be public or private.Below is a simple expln.Variables and co...
Answer Question

Select Best Answer

092004

SEP

06:04 AM

1863
Views
5
Ans

What are the components of a PL/SQL Block ?


o
o

PL/SQL Interview Questions

Declarative part, Executable part and Exception part. Datatypes PL/SQL


satyam_Ora

May 14th, 2008

All has given the right answer and I am repeating the same.There are the three component of
PL/SQL program block1) Declarative( Where you can decalre the variable which would be used as a
part of exce...
g_sidhu

o
Feb 16th, 2008
A PL/SQL block consists of up to three sections: declarative (optional), executable (required), and
exception handling (optional).
Answer Question

AUG

Select Best Answer

172006

06:47 AM

1724
Views
8
Ans

What will the Output for this Coding> Declare Cursor c1 is select
* from emp FORUPDATE; Z c1%rowtype;Begin Open C1;Fetch c1
into Z;Commit;Fetch c1 in to Z;end;
o

RamaKrishna.Yerra,TCS,Hyd,9989018508

PL/SQL Interview Questions

satyam_Ora

o
May 8th, 2008
Please remove the commit from the begin statement and the it will execute properly.Thanks,
satyam_Ora

o
May 8th, 2008
DeclareCursor c1 is select * from emp FORUPDATE;Z c1%rowtype;BeginOpen C1;Fetch c1 into
Z;Commit;Fetch c1 in to Z;end; SQL> start e1 Declare * ERROR at line 1: ORA-01002: fetch out of
sequence...
Answer Question

Select Best Answer

AUG

272007

07:37 AM

1892
Views
4
Ans

How do you encrypt the function to prevent accessing from


users without specific permission. ?
o

suhasshah2007

PL/SQL Interview Questions

krishnaindia2007

o
May 13th, 2008
Using wrap utility we can encrypt source code of a function to byte code (Not a readable format).
Becareful there is no decrypt utility to convert source co...
nitingalande

o
Jan 13th, 2008
Function can be encrypted using Oracle Wrap utility. this will prevent accessing from users without
permission

Sort by:
Answers
|
Date
Jump to Page:
17

JUL

06:39 PM

252007

2817
Views
2
Ans

Why DUAL table is not visible?


o

Manjeet

PL/SQL Interview Questions

Read Best Answer

Editorial / Best Answer


krishnaindia2007

Member Since Sep-2007 | May 13th, 2008

DUAL is a part data dictionary and owned by SYS. You should not make modifications to this
table.
It contains only one row and one column of VARCHAR2 datatype.
Used to refer an object which does not have any pysical reference in database table.
Ex:- Select sysdate from dual.
krishnaindia2007

o
May 13th, 2008
DUAL is a part data dictionary and owned by SYS. You should not make modifications to this
table. It contains only one row and one column of VARCHAR2 datatype.Used to refer an object
which does not have any pysical reference in database table.Ex:- Select sysdate from dual.
jhoombrabar

o
Aug 16th, 2007
Because its a dummy table.
Improve Answer

182006

SEP

05:15 AM

2060
Views
7
Ans

1)any one can tell me,suppose we have 1000 of records,ok.then


we want to update only 500 records,how can we solve this
problem?2)how many types of "explicit cursors" we have?
o

suri

PL/SQL Interview Questions

satyam_Ora

o
May 8th, 2008
Sql> update set col_name='value' where rownum<=500;Note: rowid will not work instead of
rownum for updating the 500 records.
askvenki

o
Jul 20th, 2007
hi guys i think rownum work only for at the time of select statement
Answer Question

AUG

Select Best Answer

152006

10:31 AM

1910
Views
3
Ans

Can we declare a column having number data type and its scale
is larger than pricesionex: column_name NUMBER(10,100),
column_name NUMBAER(10,-84)
o

ananth

PL/SQL Interview Questions

satyam_Ora

o
May 8th, 2008
SQL> create table a2(a number(10,100)); Table created. SQL> create table a3(a number(10,84));Table created.
Oracle_learner

o
Sep 20th, 2006
Yes ,such declaration is possible .Explaining with example .1.number(9,11) means there are 11 digits
after decimal .However as the max precision is 9 so the rest are zero padded .Like
0.009999999992.n...
Answer Question

MAR

Select Best Answer

072007

12:00 PM

5138
Views
2
Ans

What is difference between PL/SQL tables and arrays?


o

AT

PL/SQL Interview Questions

krishnaindia2007

May 8th, 2008

PL/SQL tables are temporary array like objects used in a PL/SQL Block. The size of pl/sql table is
unconstrained. For varrays we need to specify upperbound.Pl/sql tables can not be stored in
database ...
jaswanthi.p

o
Mar 8th, 2007
array is set of values of same datatype.. where as tables can store values of diff datatypes.. also tables
has no upper limit where as arrays has.
Answer Question

JUL

Select Best Answer

252006

03:34 AM

1926
Views
4
Ans

State the advatage and disadvantage of Cursor's


o

senthil

PL/SQL Interview Questions

krishnaindia2007

o
May 7th, 2008
Whenever we execute DML statements oracle assigns a work area called private sql area to store
information. Cursors meachanism allows us to name that private sql area there by access information
...
Venkat9999

o
Sep 21st, 2006
I think your implict and explict cursor concent needs a correction:EXPLICIT CURSORS are used,
when you are getting more than a single row of data that needs to be processed further. Explicit cur...
Answer Question

Select Best Answer

JUL

192006

02:55 AM

1754
Views
4
Ans

How to trace the errors in pl/sql block code..


o

rajanen

PL/SQL Interview Questions

krishnaindia2007

o
May 7th, 2008
You can useUSER_ERRORSorSHOW ERRORSYou may also use DBMS_OUTPUT.PUT_LINE
pari

o
Mar 14th, 2007
The correct command isSHOW ERRORS orSHOW ERR
Answer Question

APR

Select Best Answer

012006

12:49 PM

10693
Views
5
Ans

What is difference between varray and nested table.can u explain


in brief and clear my these concepts.also give a small and sweet
example of both these.
o

nayan

PL/SQL Interview Questions

krishnaindia2007

o
May 7th, 2008
The following are the main differences between nested tables and varray1. Nested tables are
unbounded where as varray has maximun limit.2. Nested tables are dense intially but can be sparse
latte...
g_sidhu

o
Feb 18th, 2008
Nested tables are unbounded. Initially dense but can become sparse through deletions. Order is not
preservedCan be indexed VARRAYs are always bounded(varying arrays have a limited number of
entr...
Answer Question

DEC

Select Best Answer

072005

03:59 AM

5122
Views
3
Ans

What is bulk binding please explain me in brief ?


o

sandeep kelkar

PL/SQL Interview Questions

krishnaindia2007

May 7th, 2008

Generally to process large number of records in pl/sql we use cursors . But cursors process records
sequentially. It increases number of context switches between SQL and PL/SQL there by hampers
perfor...
Ashok kr. Choubey

o
Mar 4th, 2006
Hi ,Bulk Binding is used for avoiding the context switching between the sql engine and pl/sql engine.
If we use simple For loop in pl/sql block it will do context switching between sql and pl/sql engi...
Answer Question

JUL

Select Best Answer

082005

02:58 PM

14610
Views
5
Ans

What is Overloading of procedures ?


o
o

PL/SQL Interview Questions

TheSame procedure name is repeated with parameters of different datatypes and


parameters in different positions, varying number of parameters is called overloading
of procedures. e.g. DBMS_OUTPUT put_line What is a package ? What are the advantages of
packages ?
krishnaindia2007

o
May 6th, 2008
Definining two or more procedures with same name is called overloading of procedures. But they
must differ in no or order or datatype family of formal arguments.
g_sidhu

Jan 31st, 2008

Overloading: Multiple subprograms of the same name Enables you to use the same name for
different subprograms inside a PL/SQL block, a subprogram, or a package Requires the formal
paramete...

Answer Question

Select Best Answer

092004

SEP

06:04 AM

1784
Views
2
Ans

Give the structure of the procedure ?


o
o

PL/SQL Interview Questions

PROCEDURE name (parameter list.....) is local variable declarations


Executable statements. Exception. exception handlers
end;

BEGIN

krishnaindia2007

o
May 6th, 2008
[CREATE [OR REPLACE]] PROCEDURE procedure_name[(Optional Parameters)] {IS | AS}
[PRAGMA AUTONOMOUS_TRANSACTION;] [local declarations] BEGIN executable statements
[EXCEPTION exception handlers] END [name];
KiranKW

o
May 2nd, 2007
Create or replace procedure proc_name (optional parameters)as beginexecutable
statements;exception handlingend;end proc_name;
Answer Question

Select Best Answer

092004

SEP

06:04 AM

2432
Views
4
Ans

What are the two parts of a procedure ?


o
o

PL/SQL Interview Questions

Procedure Specification and Procedure Body.


krishnaindia2007

o
May 6th, 2008
This is from Oracle PL/SQL DocumentationA procedure has two parts: the specification (spec for
short) and the body.The procedure spec begins with the keyword PROCEDURE and ends with the
procedurename ...
salmankhan

o
May 26th, 2007
There Nothing like two parts of procedure..It is basically related to packages...Specification of
package and body of package
Answer Question

Select Best Answer

092004

SEP

06:04 AM

3118
Views
3
Ans

Where the Pre_defined_exceptions are stored ?


o
o

PL/SQL Interview Questions

In the standard package. Procedures, Functions & Packages ;


krishnaindia2007

o
May 6th, 2008
Predefined exceptions are globally declared in standard package
g_sidhu

o
Jan 31st, 2008
PL/SQL declares predefined exceptions in the STANDARD package.
Answer Question

Select Best Answer

092004

SEP

06:04 AM

4558
Views
2
Ans

What are two virtual tables available during database trigger


execution ?
o
o

PL/SQL Interview Questions

The table columns are referred as OLD.column_name and NEW.column_name.For triggers


related to INSERT only NEW.column_name values only available.For triggers related to
UPDATE only OLD.column_name NEW.column_name values only available.For triggers
related to DELETE only OLD.column_name values only available.
krishnaindia2007

May 6th, 2008

OLD and NEW are two virtual tables available during database trigger execution.UPDATE statement
has access to both old and new values.INSERT statement has access only to new...
bambino_chakma

o
Jul 15th, 2007
The two virtual table available are old and new.
Answer Question

Select Best Answer

092004

SEP

06:04 AM

3329
Views
3
Ans

Explain the two type of Cursors ?


o
o

PL/SQL Interview Questions

There are two types of cursors, Implicit Cursor and Explicit Cursor.PL/SQL uses Implicit
Cursors for queries.User defined cursors are called Explicit Cursors. They can be declared and
used.
krishnaindia2007

o
May 6th, 2008
Cursors are of two types1. Implicit Cursors: - Whenever we execute sql statements oracle server
assigns a work area called private sql area to store precessed infomation. The most recently used ...
Lavanya Chowdary

o
May 6th, 2007
There r two types of cursors in the pl/sql1.Implici 2.explicit For the select stmt which is retrieving
single record or all the dml operations in the pl/sql program system automatically allocates...
Answer Question

Select Best Answer

MAR

012007

02:28 PM

2122
Views
6
Ans

In function and procedure the parameter pass is "call by value"


or "call by reference"?
o

ddkdhar

PL/SQL Interview Questions

krishnaindia2007

o
May 3rd, 2008
IN :- actual parameter is passed by reference (a pointer to the value is passed in) OUT:- actual
parameter is passed by value (a copy of the value is passed out) unless NOCOPY is specified I...
ashwinee2

o
Apr 10th, 2008
Take this:IN parameters are passed by reference, so the value cannot be changed in the procedure and
functions.Out and IN-OUT parameters are passed by value, so the values can be changed inthe
procedures and fucnctions.
Answer Question

JUN

Select Best Answer

302006

04:52 AM

1334
Views

4
Ans

What is diffrence between IS and AS in procedure?


o

pankaj_gauba

PL/SQL Interview Questions

krishnaindia2007

o
May 3rd, 2008
You can use either of them . Both are same.
amahanit

o
Both are same

Oct 13th, 2007

Answer Question

NOV

Select Best Answer

152006

12:03 PM

10886
Views
3
Ans

Mention the differences between aggregate functions and


analytical functions clearly with examples?
o

dev

PL/SQL Interview Questions

krishnaindia2007

May 3rd, 2008

Group functions returns one result per each group of the result setWhere as analytical functions
returns multi rows per each group i.e. using analytical functions we may display group results along
with individual rows.
dev

o
Dec 19th, 2006
Thank u Rampratap.Dev
Answer Question

Select Best Answer

122007

SEP

04:55 AM

2700
Views
3
Ans

What are mutating tables?


o

Abirami

PL/SQL Interview Questions

When a table is in state of transition it is said to be mutating. eg :: If a row has been deleted then
the table is said to be mutating and no operations can be done on the table except select.
krishnaindia2007

o
May 3rd, 2008
Mutate means chage. Mutating table is a table that is being modified by update, delete or insert
statement.
amahanit

o
Oct 13th, 2007
It's a table which is currently being modified by a trigger statement.
Answer Question

Select Best Answer

APR

052007

01:48 AM

1531
Views
3
Ans

How to create a constraint for a tablecolumn which is already


created
o

subbaraovangalli

PL/SQL Interview Questions

krishnaindia2007

o
May 3rd, 2008
To add primary key or unique key constraint Alter table tablename add constraint constraintname
primary key / unique (column name)To add check constraint Alter table tablename add constrai...
hindol_saha

o
Apr 9th, 2007
ALTER TABLE STUDENT ADD CONSTRAINT PK_STD_ID PRIMARY KEY (STUDENT_ID);
Answer Question

APR

Select Best Answer

292008

02:56 AM

2000
Views
0
Ans

Nested tables
o

jannaat

PL/SQL Interview Questions

How do you create nested tables?

FEB

132008

10:44 PM

977
Views

1
Ans

Package and Module


o

Pavithara

PL/SQL Interview Questions

What is the difference between a package and a module?


tariq_oracle

Apr 13th, 2008

Module is a collection of Package


Answer Question Select Best Answer

182006

JUL

10:07 AM

866
Views

5
Ans

What is the difference between granting and creating a view?


o

umadevi

PL/SQL Interview Questions

Noel Lastra

Mar 13th, 2008

GRANT and REVOKE are DCL commands ...


amahanit

Dec 1st, 2007

grand is to provide privilege on a specific object to a usereg. grand select on emp to


uma;well view is a database object which is made from column of one or more tables.if u
don't have ...
Answer Question Select Best Answer

FEB

252008

01:30 PM

1205
Views

1
Ans

Nested and Normal Table


o

jagadeesh9

PL/SQL Interview Questions

What is the difference between Nested Table and Normal Table?


garvi.1983

Mar 5th, 2008

Normal Table : It contain rows and columns.Each Row-Column represente only one value
i.e intersection of Row-Columncreate table t1(col1 number(10), col2 varchar2(9));----->Creates normal tabl...
Answer Question Select Best Answer

JAN

082007

06:21 AM

1826
Views

5
Ans

What happens when commit is given in executable section and


an error occurs ?please tell me what happens if exception block
is committed at the last?
o

preethi

PL/SQL Interview Questions

ae_sathis

Feb 24th, 2008

SQL> create table d ( sl number(4), name varchar2(5)); now do the following


operation:SQL> begin insert into d values ('1223123123','geekinterview'); --making insert to
fail here commit; exception ...
geetha24

Feb 9th, 2007

Whenever the exception is raised ..all the transaction made before will be commited. If the
exception is not raised then all the transaction will be rolled back.
Answer Question Select Best Answer

262006

MAY

05:45 PM

11212
Views

6
Ans

What is autonomous Transaction? Where are they used?


o

sbagai2001

PL/SQL Interview Questions

shinehere

Feb 24th, 2008

An autonomous transaction is a transaction that is started within the context of another


transaction, called the parent transaction, but is independent of it.An autonomous
transaction can be committed...
g_sidhu

Feb 18th, 2008

A autonomous transaction starts with the first sql statement of the pl/sql block and ends with
a commit. It starts within the context of an another transaction called parent transaction and
independen...
Answer Question Select Best Answer

FEB

202008

08:03 AM

1981
Views

0
Ans

Pl/SQL coding help


o

kshasikumar

PL/SQL Interview Questions

User Interface accepts the Employee information and this data needs to be compared with the existing
data and the differences needs to be populated through a Pl/SQL table.Create a type (EMP_DATA) to
populate the Employee table data.Create a type (ERR_TABLE) with the following attributes:ERR_NO
NUMBER,ERR_COLUMN VARCHAR2(50),ERR_RESULT VARCHAR2(500)Create a package
USER5_PKG1 with two procedures....
Answer Question

NOV

062007

02:14 AM

1785
Views

2
Ans

Oracle - Could not find the Program unit


o

Mukti

PL/SQL Interview Questions

While i compiled my code , it got compiled but while running my application

i got the Oracle error

"Could not find the Program unit ? "Can any one tell exactly why this happens.I had validated all the
objects and even released all the Locked objects . But still this error persisted .
binurajnair

Feb 20th, 2008

This error can occur in the following scenario also. The application has a constant
connection with the database and a package which the application uses gets recompiled.
And the recompiled package co...

raj_imr2000

Jan 15th, 2008

Hi,ORA-06508:PL/SQL: could not find program unit being calledCause:An attempt was
made to call a stored program that could not be found. The program may have been
dropped or incompatibly modified, or ...
Answer Question Select Best Answer

032007

JUL

01:23 AM

1790
Views

3
Ans

What is the disadvantage of out paramter in functions


o

Sushma

PL/SQL Interview Questions

g_sidhu

Feb 19th, 2008

We cant use functions with OUT parameter in sql statements because there is no way for
you to declare a variable in a SQL query and in order to call an IN OUT -- you need a local
variable (to supply a value to be read from and to supply a place to put the out value into).
ramaswamy
o

Sep 26th, 2007

Functions with "out" parameters cannot be used in SQL statments however I disagree with
you rajeev because functions without parameters can also be called in select statments as
long as they havea return() (Eg: SYSDATE)
Answer Question Select Best Answer

MAR

222007

04:36 AM

4646
Views

5
Ans

Pragma Init Exception


o

ily_saravanan

PL/SQL Interview Questions

What is Pragma Init Exception ? what is difference between user defined exception and init pragma
exception. what is the use of it.
g_sidhu

Feb 19th, 2008

You trap a nonpredefined Oracle server error by declaring it first, or by using the OTHERS
handler. The declared exception is raised implicitly. In PL/SQL, the PRAGMA
EXCEPTION_INIT tells the compiler...
Sachin Kale
o

Nov 21st, 2007

Pragma is a compiler Directive that is process at compile time, Not at run time.In pl/sql the
Pragma Exception_init tells the compiler to asociate an exception name with an oracle error
number.That le...
Answer Question Select Best Answer

OCT

252006

10:32 PM

3073
Views

5
Ans

What is the difference between database trigger and schema


trigger?
o

ambuji david

PL/SQL Interview Questions

g_sidhu

Feb 18th, 2008

Triggers on system events can be defined at the database or schema level. A trigger
defined at the database level fires for all users, and A trigger defined at the schema or table
level fires only when the triggering event involves that schema or table.
rampratap409

Dec 5th, 2006

In database trigger: Trigger for a table /view is a database triggerlike ( before , insert *
update, delete, insert * row level, statement level)2 * 3 * 2 = 12 + instead off tr...
Answer Question Select Best Answer

OCT

182006

11:11 AM

1723
Views

4
Ans

HI,What is Flashback query in Oracle9i...?


o

dev

PL/SQL Interview Questions

g_sidhu

Feb 18th, 2008

Oracle9i introduced Flashback Query to provide a simple, powerful and completely nondisruptive mechanism for recovering from human errors. It allows users to view the state of
data at a point in time...
joybanerjee

Dec 26th, 2007

when ever a table is dropped the database does not release the space assotiated
with it the table is kep...
Answer Question Select Best Answer

JUN

112006

04:34 AM

6039
Views

6
Ans

What is pragma? can any one give me the example of


autonomous Transaction ?can we change the order of procedure
parameter while calling procedure?
o

manali

PL/SQL Interview Questions

g_sidhu

Feb 18th, 2008

A pragma is compiler directive. Pragmas are processed at compile time, not at run time.
They pass information to the compiler.
g_sidhu

Feb 1st, 2008

Using Named & Combination Parameter passing Methods you can change the order of
parameter in a procedureNamed: List actual parameters in arbitrary order by associating
each with its corresponding ...
Answer Question Select Best Answer

JUN

062006

02:56 PM

1642
Views

3
Ans

What is Mutation of a trigger? why and when does it oocur?


o

rajanipriya

PL/SQL Interview Questions

g_sidhu

Feb 18th, 2008

A mutating table is a table that is currently being modified by an UPDATE, DELETE, or


INSERT statement. A table is not considered mutating for STATEMENT triggers. The
triggered table itself is a mutat...
Arun Arumugam
o

Jul 1st, 2006

A table is said to be a Mutating table under the following three circumstances1) When u try
to do delete, update, insert into a table through a trigger and at the same time u r trying to
select the sa...
Answer Question Select Best Answer

JAN

06:54 AM

252006

2556
Views

3
Ans

What type of binding is PL/SQL?


o

Indira rani

PL/SQL Interview Questions

g_sidhu

Feb 16th, 2008

Before a PL/SQL program can be executed, it must be compiled. The PL/SQL compiler
resolves references to Oracle objects by looking up their definitions in the data dictionary.
Then, the compiler assig...
chaitu
o

May 27th, 2006

pl/sql uses early binding.


Answer Question Select Best Answer

SEP

092004

06:04 AM

2651
Views

2
Ans

What are the datatypes a available in PL/SQL ?

o
o

PL/SQL Interview Questions

Some scalar data types such as NUMBER, VARCHAR2, DATE, CHAR, LONG, BOOLEAN.Some
composite data types such as RECORD & TABLE.
g_sidhu

Feb 16th, 2008

ScalarCHARVARCHAR2 LONGLONG RAWNUMBER [(precision,


scale)]BINARY_INTEGERPLS_INTEGERBOOLEAN Composite
TypesRECORDTABLEVARRAYLOB TypesBFILEBLOBCLOBNCLOBReference TypesREF
CURSORREF object_type
rampratap409

Oct 26th, 2006

Following are the datatype supported in oracle PLSQLScalar


TypesBINARY_INTEGERDECDECIMALDOUBLE
PRECISIONFLOATINTINTEGERNATURALNATURALNNUMBERNUMERICPLS_INTEGER
POSITIVEPOSITIVENREALSIGNTYPESMALLINTCHARC...
Answer Question Select Best Answer

SEP

092004

06:04 AM

3719
Views

6
Ans

What is the basic structure of PL/SQL ?


o
o

PL/SQL Interview Questions

PL/SQL uses block structure as its basic structure. Anonymous blocks or nested blocks can be used in
PL/SQL.
g_sidhu

Feb 16th, 2008

PL/SQL is a block-structured language, meaning that programs can be divided into logical
blocks. A PL/SQL block consists of up to three sections: declarative (optional), executable
(required), and exception handling (optional).
Me
o

Oct 5th, 2007

DeclarationBeginException HandlingEnd
Answer Question Select Best Answer

OCT

242006

11:03 AM

2614
Views

6
Ans

What is the difference between database server and data


dictionary
o

padma radhika

PL/SQL Interview Questions

psiva_oracle

Feb 12th, 2008

Hi,Database Server :It's contains the collection of


objects (Table,procedure,trigger,sequence,index,etc)it's also contains the Schema and user
detailswe can view the details which are in t...
g_sidhu

Feb 4th, 2008

Database Server: A computer in a LAN dedicated to database storage and retrieval. The
database server is a key component in a client/server environment. It holds the database
management system (DBMS) ...
Answer Question Select Best Answer

APR

292007

05:30 AM

6565
Views

2
Ans

What is the difference between database trigger and application


trigger?
o

RAJASEKARAN

PL/SQL Interview Questions

g_sidhu

Feb 5th, 2008

Application trigger: Fires whenever an event occurs with a particular application Database
trigger: Fires whenever a data event (such as DML) or system event (such as logon or
shutdown) occurs on a schema or database
Sumit Tiwary
o

May 2nd, 2007

Database triggers are backend triggeres and perform as any event occurs on databse level
(ex. Inset,update,Delete e.t.c) wheras application triggers are froentend triggers and
perform as any event taken on application level (Ex. Button Pressed, New Form Instance
e.t.c)Rgds,Sumit Tiwary.
Answer Question Select Best Answer

JUN

212006

05:12 AM

4432
Views

7
Ans

What is HIGH WATERMARK?I got to know that it is reset when


the TRUNCATE command is executed on a table.
o

risham

PL/SQL Interview Questions

Sudhir Sorout

Feb 4th, 2008

Yes when we truncate instead of delete, for deleting records , truncate set the HWM to 'zero'
but if we use only delete then HWM remain same ......Sudhir Sorout
g_sidhu

Feb 1st, 2008

Within a segment, the high water mark indicates the amount of used space, or space that
had been formatted to receive data.You cannot release space below the high water mark
(even if there is no data ...
Answer Question Select Best Answer

OCT

182006

09:53 AM

2032
Views

5
Ans

Hi,Can anyone tell me the difference between instead of trigger,


database trigger, and schema trigger?Thanks.

dev

PL/SQL Interview Questions

g_sidhu

Feb 4th, 2008

Triggers on system events can be defined at the database or schema level. A trigger
defined at the database level fires for all users, and a trigger defined at the schema or table
level fires only whe...
Nasim
o

Dec 17th, 2006

Hiif we have created a view that is based on join codition then its not possibe to apply dml
operations like insert, update and delete on that view. So what we can do is we can create
instead off trig...

Sort by:
Answers
|
Date
Jump to Page:
19

JUL

262006

03:37 AM

4108
Views
5
Ans

What is difference b/w stored procedures and application


procedures,stored function and application function..
o

rajanen

PL/SQL Interview Questions

g_sidhu

Feb 4th, 2008

procedures or functions: Named PL/SQL blocks stored in an Oracle Forms Developer


application or shared library; can accept parameters and can be invoked repeatedly by name and are
availabl...
Application

Nishant Patel

o
Jun 13th, 2007
The difference between the two can be categorised via: Stored subprograms ans Application
subprograms1) Stored subprograms: These are coded and compiled from within the Oracle
database via SQL Plus e...
Answer Question

JAN

Select Best Answer

232008

09:36 AM

1191
Views
1
Ans

Difference between Oracle 8i and Oracle 9i as a Developer


o

prk_cbz

PL/SQL Interview Questions

What are the diffrences between Oracle 8i and Oracle 9i as a Developer, not as a DBA??
bismitapadhy

o
Feb 3rd, 2008
ISQl*plus and J-server is not there in oracle-8i which are there in 9iBismita
Answer Question

Select Best Answer

032006

MAY

07:23 AM

2160
Views
4
Ans

Details about FORCE VIEW why and we can use


o

shami

PL/SQL Interview Questions

g_sidhu

o
Feb 1st, 2008
Force View: creates the view regardless of whether or not the base tables exist or whether the user
has privileges on them. The user still cant execute the view, but he or she can create it. No...
Lavanya Chowdary

o
May 6th, 2007
Generally we are not supposed to create a view without base table. If you want to create any view
without base table that is called as Force View or invalid view. Syntax: CREATE FORCE VIEW AS
< SELEC...
Answer Question

Select Best Answer

022006

MAY

03:46 AM

1655
Views
4
Ans

How can one view all the procedures,functions,triggers and


packages created by the user
o

Ashvini

PL/SQL Interview Questions

g_sidhu

o
Feb 1st, 2008
SELECT object_name, object_typeFROM user_objectsWHERE object_type in
('PROCEDURE','FUNCTION')ORDER BY object_name;
Sphurti

o
Aug 14th, 2006
Basically, here USER_OBJECTS will have all the objects which are created/own by a particular user
whereas ALL_OBJECTS will have information of the objects for which a user has access, it may or
may not be created by that user.
Answer Question

APR

Select Best Answer

252006

11:41 PM

2758
Views
6
Ans

What is the difference between User-level, Statement-level and


System-level Rollback? Can you please give me example of
each?
o

kameshakundy

PL/SQL Interview Questions

g_sidhu

Feb 1st, 2008

Statement-level: Part of a transaction can be discarded by an implicit rollback if a statement


execution error is detected. If a single DML statement fails during execution of a transaction, it s
effe...
kameshakundy

o
Nov 12th, 2006
Dear Kamini,May I know what do you mean by PG
Answer Question

MAR

Select Best Answer

082006

06:27 AM

2026
Views
4
Ans

What happens when DML Statement fails?A.User level


rollbackB.Statement Level RollbackC.Sustem Level Rollback
o

Nitin Joshi

PL/SQL Interview Questions

g_sidhu

o
Feb 1st, 2008
If a single DML statement fails during execution of a transaction, it s effect is undone by a statementlevel rollback, but the changes made by the previous DML statements in the transaction are not
discarded. They can be committed or rolled back explicitly by the user.
Chiru

o
Jun 21st, 2006
When a DML statement executes (fails/sucess) an automatic Commit is executed. Eg : Create a
table t1. Insert a record in t1. Then again to create the same object t1.
Answer Question

Select Best Answer

FEB

092006

10:11 AM

1326
Views
6
Ans

What are ref cursors ?


o

Shweta_faqs

PL/SQL Interview Questions

g_sidhu

o
Jan 31st, 2008
Cursor variables are like C or Pascal pointers, which hold the memory location (address) of some
item instead of the item itself. Thus, declaring a cursor variable creates a pointer, not an item. In P...
nisha

o
Aug 24th, 2006
ref cursor is a simple cursor but it is a datatype that allow developers to declare cursor variableref
cursor has 2 types:-strong ref cursor where we mention the return type with rowtype.weak cursor w...
Answer Question

Select Best Answer

092004

SEP

06:04 AM

3215
Views
2
Ans

What are the return values of functions SQLCODE and SQLERRM


?
o
o

PL/SQL Interview Questions

SQLCODE returns the latest code of the error that has occurred.SQLERRM returns the relevant
error message of the SQLCODE.
g_sidhu

o
Jan 31st, 2008
SQLCODE: Returns the numeric value for the error code SQLERRM: Returns the message
associated with the error numberSQLCODE Value
&nbs...
acpsrinivas

o
Feb 25th, 2006
Pl / Sql Provides Error Information via two Built-in functions, SQLCODE & SQLERRM.SQLCODE
Returns the Current Error Code.
&nb...
Answer Question

Select Best Answer

092004

SEP

06:04 AM

2312
Views
4
Ans

What are advantages fo Stored


Procedures / Extensibility,Modularity, Reusability,
Maintainability and one time compilation.
o
o

PL/SQL Interview Questions

g_sidhu

o
Jan 31st, 2008
In addition to modularizing application development , stored procedures and functions have
thefollowing benefits:1) Improved performanceAvoid reparsing for multiple users by exploiting the
shared SQL a...
deviji2000

o
Oct 16th, 2007
procedures and function hv many benefits in addition to modularizing application
development.1)
easy maintenance : sub programs are lo...
Answer Question

Select Best Answer

092004

SEP

06:04 AM

1662
Views
2
Ans

What are two parts of package ?


o
o

PL/SQL Interview Questions

The two parts of package are PACKAGE SPECIFICATION & PACKAGE BODY. Package
Specification contains declarations that are global to the packages and local to the
schema.Package Body contains actual procedures and local declaration of the procedures
and cursor declarations.
g_sidhu

o
Jan 31st, 2008
A package usually has a specification and a body, stored separately in the database.The specification
is the interface to your applications. It declares the types, variables, constants, exceptions, cu...
Mahesh Argade

Jun 28th, 2006

In addition to this Both Package Spec and Package Body are stored separately in the Data
basePackage specifications act as an interface for the Package

Answer Question

Select Best Answer

092004

SEP

06:04 AM

4416
Views
5
Ans

What is a stored procedure ?


o
o

PL/SQL Interview Questions

A stored procedure is a sequence of statements that perform specific function.


g_sidhu

o
Jan 31st, 2008
A procedure is a named PL/SQL block that can accept parameters (sometimes referred to
as arguments), and be invoked. Generally speaking, you use a procedure to perform an action. A
procedure has ...
ramesh_resides

o
Jun 23rd, 2007
Stored procedure is a sub program and stored in memory for repated execution
Answer Question

Select Best Answer

022005

SEP

06:41 AM

3532
Views
10
Ans

Is it possible to use Transaction control Statements such a


ROLLBACK or COMMIT in Database Trigger ? Why ?
o
o

PL/SQL Interview Questions

It is not possible. As triggers are defined for each table, if you use COMMIT of
ROLLBACK in a trigger, it affects logical transaction processing.
g_sidhu

o
Jan 31st, 2008
COMMIT, ROLLBACK, and SAVEPOINT statements are not allowed within the trigger body. It is
possible to commit or rollback indirectly by calling a procedure, but it is not recommended because
of side effects to transactions.
jockey

o
Aug 2nd, 2007
Using autonomous_transaction it is possible
Answer Question

Select Best Answer

092004

SEP

06:04 AM

9431
Views
3
Ans

Explain the usage of WHERE CURRENT OF clause in cursors ?


o
PL/SQL Interview Questions

WHERE CURRENT OF clause in an UPDATE,DELETE statement refers to the latest row


fetched from a cursor. Database Triggers
g_sidhu

o
Jan 31st, 2008
When referencing the current row from an explicit cursor, use the WHERE CURRENT OF clause.
This allows you to apply updates and deletes to the row currently being addressed, without the need
to explic...
Shefali

o
Aug 16th, 2006
"WHERE CURRENT OF" clause is used for updating or deleting rows selected by the cursor with
FOR UPDATE cluase.It explicitily locks the row for updating or deleting.
Answer Question

Select Best Answer

292007

MAY

09:14 PM

813
Views
3
Ans

How do you compile a package?


o

physical

PL/SQL Interview Questions

mittu

o
Jan 22nd, 2008
Right click on package and choose [execute]elseexecute package_name;

Larry

o
Nov 6th, 2007
Execute package_name;
Answer Question

JAN

Select Best Answer

152008

01:44 PM

1445
Views
0
Ans

For each hour, list the number of called, total transactions'


values, and total duration.
o

mnmlove

PL/SQL Interview Questions

For each hour, list the number of called, total transactions' values, and total duration?if you have
these tables:1- 'calls'columns: called_number, Customer_ID, call_date, call_time_started,
Call_time_ended,transaction_no.2- 'tariff'columns: Tarriff_per_Sec, country_code, time_started,
time_ended.
Answer Question

OCT

252007

02:22 AM

1065
Views

1
Ans

What does a following command do. DELETE (6,3);


o

vijay

PL/SQL Interview Questions

gan20k

o
Jan 14th, 2008
This will delete Collection (eg index by table ) in the range 6,3
Answer Question

JUN

Select Best Answer

262007

03:48 PM

1876
Views
1
Ans

What do you mean by OCI, Data guard and Advance queue


responsibilities for a Oracle developers?
o

Kalyan

PL/SQL Interview Questions

nitingalande

o
Jan 13th, 2008
OCI stands for Oracle Call Interface, it is a interface api used to access oracle database from C
programs. Data Guard stands for it is multiple DB servers enviornment configured for Physical as
well ...
Answer Question

Select Best Answer

AUG

022007

05:06 AM

874
Views
1
Ans

How can you send the output from a Function or Procedure to a


'Flat file'?
o

hiavijit

PL/SQL Interview Questions

jayanthanr

o
Jan 8th, 2008
To created flat files, or read flat files in a procedure or function, the built-ins in the UTL_FILE
package can be used.
Answer Question

OCT

Select Best Answer

162007

03:44 PM

3804
Views
2
Ans

What is Oracle collections

rk2007

PL/SQL Interview Questions

kirangsv

o
Jan 6th, 2008
A collection can be loosely defined as a group of ordered elements, all of the same type that allows
programmatic access to its elements through an index. Commonly used collection types used in the
pr...
dev5000

o
Dec 26th, 2007
It is kind of datatype.Collection is nothing but a convenient way to manipulate many variables at
once.There are 3 types of collection.1. INDEX BY TABLE2. NESTED TABLE3. VARRAYS
Answer Question

AUG

Select Best Answer

132007

02:36 AM

6869
Views
3
Ans

What is the difference between IS/AS while creating a


procedure ?i.e Create or Replace procedure is/as .....
o

narendrareddy2414

PL/SQL Interview Questions

kirangsv

o
Jan 6th, 2008
Well there is no difference between is/as as they said both r one and the same when i have gone thru
the book u can use either is / as
cutesree

o
Dec 17th, 2007
There is no difference between is/as ... is is used for creating a new procedure with a new name
where as 'as' is used to create a new procedure with existing procedure name... it will not display
"procedure already exists".

Oracle refcursor and procedure


o

sivaprasadpm

PL/SQL Interview Questions

How to pass result set using refcursor from one package procedure to another package procedure? and
code also
MAQDOOMAAMER
Profile Answers by MAQDOOMAAMER Questions by MAQDOOMAAMER

Dec 25th, 2007

CREATE TABLE employees (empid NUMBER(5),empname VARCHAR2(30));INSERT


INTO employees (empid, empname) VALUES (1, 'Dan Morgan');INSERT INTO employees
(empid, empname) VALUES (2, '...
Answer Question Select Best Answer

SEP

262007

03:56 AM

1122
Views

1
Ans

What is the systematic way of tuning a query?

dinu78

Muhammad Fayyaz

PL/SQL Interview Questions

Dec 21st, 2007

1) First identify the current excecution plan by using showplan.In most cases, creating and
then forcing usage of the indexes result in drastic improvement .1) Ensure that indexes(single
or composite)&...
Answer Question Select Best Answer

OCT

162007

05:55 AM

1925
Views

1
Ans

Convert SQL to Oracle Procedure using cursor


o

preeti

PL/SQL Interview Questions

SELECT APE.DAT_INSERT_DATE as "Payment Entry Date", Case when


APE.TXT_INTERMEDIARY_CD is null or APE.TXT_PAYER_CUSTOMER_ID
APE.TXT_INTERMEDIARY_CD then (Select TXT_CUSTOMER_NAME from GENMST_CUSTOMER
where TXT_CUSTOMER_CD = APE.TXT_PAYER_CUSTOMER_ID) else(Select
TXT_INTERMEDIARY_NAME from GENMST_INTERMEDIARY where TXT_INTERMEDIARY_CD =
APE.TXT_PAYER_CUSTOMER_ID) End as "Payer Name" , APE.TXT_PAYER_CUSTOMER_ID...
joybanerjee

Dec 20th, 2007

create or replace procedure sql_to_procedure as declare cursor c1 is SELECT


APE.DAT_INSERT_DATE as "Payment Entry Date",APE.TXT_INTERMEDIARY_CD AS
"Intermediary ID",APE.TXT_PAYER_C...
Answer Question Select Best Answer

DEC

042007

03:56 AM

2661
Views

1
Ans

What is autonomous transaction in Oracle ?


o

joybanerjee

PL/SQL Interview Questions

soorajsk_84

Dec 18th, 2007

autonomous transaction are independent transaction exCREATE OR REPLACE


PROCEDURE a1ASPRAGMA AUTONOMOUS_TRANSACTION; BEGININSERT INTO
table1 VALUES('autonomous transaction');COMMIT; END;D...
Answer Question Select Best Answer

AUG

272007

12:44 AM

2449
Views

3
Ans

What are purity rules for functions? why they use ? what effects
if not follow these rules?
o

suhasshah2007

PL/SQL Interview Questions

joybanerjee

Dec 10th, 2007

The purity level defines what structure the function reads or modifies.the types of purity
level:1)wnds--write no database stage I.e&n...
malik.aman

Dec 4th, 2007

To be callable from SQL statements, a stored function (and any subprograms called by that
function) must obey certain "purity" rules, which are meant to control side effects:When
called from a SELECT ...
Answer Question Select Best Answer

AUG

022006

12:12 PM

1108
Views

7
Ans

Hi Friends!! How to retrive the no.of fields in a table..Can


anybody Assist me?Thanks&RegdsRamki
o

Rama Krishna.Y

PL/SQL Interview Questions

deepakonroll

Dec 7th, 2007

DECLARECURSOR CUR_TABLES ISSELECT table_name from user_tables;V_TABLE


NUMBER(5);v_table_name varchar2(100);BEGINFOR I IN CUR_TABLESLOOPSELECT
COUNT(1)INTO V_TABLEFROM (SELECT table_name from user_tabl...
rajakumar_na

Nov 21st, 2007

Hi all plz understand the question.........Hi Ramki try this!SELECT COUNT


(COLUMN_NAME) FROM USER_TAB_COLUMNS WHERE TABLE_NAME =
'TABLENAME';FOR example;SQL> SELECT COUNT(COLUMN_NAME) FROM ...
Answer Question Select Best Answer

OCT

112007

06:13 AM

1014
Views

1
Ans

How do you update the table implicitly using Trigger


o

Pranab Jyoti Deka

PL/SQL Interview Questions

we have a PRIMARYKEY field with auto generation in sequence of a table of records. If we delete any
one of records from the table, how can we update the table implicitly using Trigger?
amahanit

Dec 1st, 2007

Which table u want to update ,in case if it is the same table then write after delete trigger on
the table and select values from destination table.
Answer Question Select Best Answer

SEP

062007

11:13 AM

866
Views

1
Ans

What are the built-ins used in PL/SQL?


o

kowmudiswarna

PL/SQL Interview Questions

amahanit

Dec 1st, 2007

There are hundreds of build-ins avialable few ones areDBMS_OUTPUT.PUT_LINE,


DBMS_SQL, DBMS_DDL, DBMS_PIPE, DBMS_JOB
Answer Question Select Best Answer

OCT

082007

03:19 AM

995
Views

3
Ans

If you write a function and procedure with performs same task


and return a value, which will execute fast and why.
o

amahanit

PL/SQL Interview Questions

santosh_pokiri

Nov 29th, 2007

Function: Whenever a function executes it returns value .ex:create or replace function sum(x
number)asy number;begin y:=x+2; return y; -- this ...
amahanit

Oct 16th, 2007

hi ravgopal i got u'r reply,thanks. but there is still one query ,in procedures OUT and INOUT
parameters are copied from actual parameters to formal parameters(it takes extra time),so
to...
Answer Question Select Best Answer

MAR

212007

07:23 AM

6100
Views

2
Ans

What are the disadvantages of Packages and triggers??


o

Pavan

PL/SQL Interview Questions

Kavitha
o

Nov 18th, 2007

Disadvantages of Triggers It is easy to view table relationships , constraints, indexes,


stored procedure in database but triggers are difficult to view. Triggers execu...
hari_mech

Aug 20th, 2007

Disadvantages of Packages:1. You cannot reference remote packaged variables directly or


indirectly..2. Inside package you cannot reference host variable..3. We are not able to grant
a procedure in package..Disadvantages of Trigger:1. Writing more number of codes..
Answer Question Select Best Answer

OCT

05:16 AM

192006

2591
Views

9
Ans

Hi, How do we display the column values of a table using cursors


without knowing the column names inside the loop?
o

Surendran

PL/SQL Interview Questions

sankar
o

Nov 14th, 2007

We have prdefined table 'col'. from this table we can find the column names dynamically.
For ex. select cname from col where col=1 and tname='emp' then you will get first clomun
name of emp table...
Naresh Dantu
o

Nov 13th, 2006

You Can. Below is the example.DECLARECURSOR cr_dataISSELECT ROWID, a.*FROM


fnd_user a where rownum < 10;l_table_name VARCHAR2(2000) := 'FND_USER';-- IMP-This table name should be same as your from...
Answer Question Select Best Answer

OCT

302007

08:15 AM

1415
Views

1
Ans

Which error is associated with this ORA-01426?


o

prabhatushar

PL/SQL Interview Questions

prabhatushar

Oct 31st, 2007

ORA - 01426 is associated with Numeric overflow Cause : Evalution of an value expression
causes an overflow or underflow.Action : Reduce the operand
Answer Question Select Best Answer

APR

042006

10:22 AM

13745
Views

7
Ans

1.How to display current Date & Time in Pl/Sql2.How to use DML


in Procedure?
o

sairlen

PL/SQL Interview Questions

Sumeet Lalvani
o

Oct 30th, 2007

Simple statement....beginselect sysdate from into A dual;dbms_ouput.put_line(A);end;


vasu
o

Jun 28th, 2006

Declare x timestamp;begins select localtimestamp into x from


dual;dbms_output.put_line(x);end;
Answer Question Select Best Answer

OCT

132006

11:16 AM

1456
Views

4
Ans

Suppose I have 2 triggers on table T, tr1- a before insert trigger &


tr2- a before update trigger.tr1 has update (T) statement inside
body of tr1andtr2 has insert (T) statement inside body of tr2Now,
I'm tring to insert a row into T.What will hppn??
o

shamim909

PL/SQL Interview Questions

gkbiswal

Oct 21st, 2007

It(autonomous transaction) will work but it'll not satisfy your business requirement. Mutating
error is not actually an error but Oracle has provided this feauture to do away with any si...
trupti
o

Feb 13th, 2007

Hi, you can use pragma autonomous_transaction for mutating trigger ie after declare, the
first statement is pragma autonomous_transaction.
try it,
it really works!!
Answer Question Select Best Answer

212006

JUL

07:37 AM

1196
Views

2
Ans

How to return multiple records from procedure?e. g. I fired a


select query and I want to retun a result to ?
o

mkatpatal

PL/SQL Interview Questions

manish dudhe
o

Oct 15th, 2007

Hi,User Ref cursor as out parameter in procand execute as belowsql>var s


refcursorsql>exec demo_proc('manish',:s);sql>print s
Rama Krishna,TCS
o

Aug 9th, 2006

Hi Mukund!!
You have to return the selected cursor as OUT parameter and again you
have to fetch the data from that OUT cursor..Thanks&RegdsRamki
Answer Question Select Best Answer

SEP

092004

06:04 AM

3514
Views

3
Ans

What is difference between a Cursor declared in a procedure and


Cursor declared in a package specification ?

o
o

PL/SQL Interview Questions

A cursor declared in a package specification is global and can be accessed by other procedures or
procedures in a package.A cursor declared in a procedure is local to the procedure that can not be
accessed by other procedures.
divyesh
o

Oct 13th, 2007

Ref cursors are used when you want cursor to hold any no. of columns in the row.If you are
not sure about row type at complile time you use ref cursors.Sys_ref_cursors used when
you want cursors to be passed from one procedures to another procedures or functions.
ddkdhar

Feb 13th, 2007

If we declare in package body then what is difference b/w cusrsor..........?how many types of
refcursors..............?whata re the advantages of ref cursors....................?
Answer Question Select Best Answer

AUG

302006

12:59 AM

1619
Views

5
Ans

Hi Friends!! Can anybody answer what are the constraints on


Mutating tables? How to remove the mutating errors in triggers?
Urgent plzzzzzzzzzzzzzzzzThanks in
Advance..Thanks&RegdsRamki,TCS

amahanit

RamaKrishna,TCS,Hyd 9989018508

PL/SQL Interview Questions

Oct 13th, 2007

1) make the trigger as a statement level trigger.2) if u want to use :old and :new qualifer
then create 2 trigger ,1st before insert trigger and use PL/SQL table to select the values,2nd
after insert trigger and insert the values from PL/SQL tables.
be17be

Dec 1st, 2006

Ashish, can you please give an example?


Answer Question Select Best Answer

NOV

232006

04:48 AM

1687
Views

3
Ans

Hi 1.What is difference between procedure and function?1.


procedure may or may not return values whereas function must
return value2. we can call the function in the sql statements
whereas we can't call the procedureExcept these two, is there
any difference between these two.2. What is pl/sql table and what
is use of it. In which case, we can use it3. What is ref cursor, what
is the use of it.4.how the function will return multiple values. Pls
give me with examples
o

ily_saravanan

PL/SQL Interview Questions

ravgopal

Oct 10th, 2007

We can do either DDL or DML inside a function.1) Let us try keeping a DML inside a
function 1 create or replace function test (a number) return number as 2 begin 3 ...

vaibhav Tyagi
o

Sep 26th, 2007

The main difference is in Function you can perform only DDLbut in Stored
procedure you can perform DDL, DML both
Answer Question Select Best Answer

SEP

272007

05:53 PM

2564
Views

2
Ans

Function which returns previous business date of given input


date
o

Rajesh

PL/SQL Interview Questions

How can I write a function which returns previous business date of given input date1. skip holidays when
you find previous day2. skip Sunday and saturday's when you find previous dayUS holidays are defined
in HOLIDAYS tabledate, holiday_desc1-Jan-2007 New Year
ravgopal

Oct 10th, 2007

If you need to get the previous business date, just change the in_dt variable in declaration
to input_dt date := '&Dt';in_dt date := input_dt - 1;
ravgopal

Oct 10th, 2007

Did you find the solution? if not then, here it is..try thisa) Create the sample table
holiday : create table holiday (h_dt date, h_desc varchar2(100));b) let us feed some
records;Inse...
Answer Question Select Best Answer

SEP

122006

02:15 AM

1241
Views

4
Ans

What is the syntax for using triggers?


o

Ramya

PL/SQL Interview Questions

vaibhav Tyagi
o

Sep 26th, 2007

FOR- Sql ServerCreate trigger TestTriggeron tableaNameinstead of insertasbegin


transactiondeclare @aid intset @aid=0select @aid = max([columnName]) from tableNameif
@aid 0--do operationcommit transaction
madhuk17

Feb 18th, 2007

Create or replace trigger {Before/After} {Insert/Update/Delete} on [Referencing [ New as ]


[ Old as ][For each row [When ]]

Sort by:
Answers
|
Date
Jump to Page:
21

JUL

08:14 AM

202007

1770
Views
1
Ans

What is the need for using function purity in pl/sql


o

kumar sai

PL/SQL Interview Questions

Rushikesh

o
Sep 25th, 2007
To be callable from SQL statements, a stored function must obey the following "purity" rules, which
are meant to control side effects:1. When called from a SELECT statement or a paralle...
Answer Question

JUN

Select Best Answer

122007

07:34 PM

3458
Views
2
Ans

How can we print the error code in exception handling section?


o

madhug56

PL/SQL Interview Questions

devi

Sep 25th, 2007

You can print the 'sqlcode' as followsException When others thendbms_output.put_line('error


code is'||sqlcode)end;
jayachandra_jc

o
Jun 20th, 2007
EXCEPTIONWHEN No_privilages THENhtp.p( ' Access denied');WHEN Rec_expired
THENhtp.p('Other user has changed this record,Query the record and Update');WHEN OTHERS
THENHtp.p(SQLERRM);
Answer Question

Select Best Answer

052007

SEP

10:25 AM

1137
Views
1
Ans

How to get a returned multiple values from procedure by using


cursor
o

senthil27583

PL/SQL Interview Questions

devi123

o
Sep 25th, 2007
Declare the collection variable (varrys or PL/SQL tables) as out parameter for the procedure and
fetch the result set into collection variable.
Answer Question

Select Best Answer

182007

SEP

05:25 AM

1790
Views
1
Ans

How to create a cluster for existing table?


o

kartheek

PL/SQL Interview Questions

Vaibhav Tyagi

o
Sep 25th, 2007
You cannot move existing table into a cluster. You can create new tables though, including tables
with the same contents as existing tables. In the second. form, query returns a set of rows which...
Answer Question

JUN

Select Best Answer

252007

05:34 AM

956
Views
1
Ans

Is there any way (other than recreating the sequence) to set the
currVal and nextVal in a sequence to some value different from
its actual value?
o

Rahul B

PL/SQL Interview Questions

dearvandna

o
Sep 21st, 2007
No. but maybe associative arrays can help
Answer Question

AUG

Select Best Answer

012007

06:58 AM

1623
Views
1
Ans

How do we use %type and %rowtype in associative array?


o

mohammed sibghatullah

PL/SQL Interview Questions

dearvandna

o
Sep 21st, 2007
Normally use it as sql%type or sql%rowtype. But if you are using a cursor then use it cursorname
%type or cursorname%rowtype.
Answer Question

Select Best Answer

222007

MAY

02:03 AM

2352
Views
1
Ans

What is the difference between a temp table and a cursor?


o

spooja

PL/SQL Interview Questions

Ravindra Reddy

o
Sep 5th, 2007
Cursor is a private SQL area.. its a temporary buffer used to hold the
transactional data on it n used to manipulate multiple rows through PL/SQL block
statements.
Temporary table can hold the records permanently and we can do DML operations
on this..
ok
Cheers
Rav'i'ndra Reddy
Answer Question

Select Best Answer

122007

MAY

11:11 PM

969
Views
2
Ans

What are the Blocks in PL/SQL?


o

brahmaiah

PL/SQL Interview Questions

Ravindra Reddy

o
Sep 5th, 2007
The PL/SQL Blocks are 2 types1. Ananymous Block2. Named Block1. Ananymous Block means
with out any name.Ex:- Declare<variables>Begin<Exec Statmts>ExceptionEnd.2. Names Block
are ...

Sanjay Bharti

o
Jun 13th, 2007
Hi All,I am new to this community. It seems the question is related to Begin End block of PL/SQL.
See if you do not want to write any procedure and you want to do some sequence of operation that
inclu...
Answer Question

AUG

Select Best Answer

312006

03:39 AM

1523
Views
7
Ans

Hiii have a table which consists of 2 lakh records and numbering


is not there for these records.now i want to implement numbering
for those records and also to the records which are going to be
inserted in future..will it be possible with sequence.if so how???
o

srikanth

PL/SQL Interview Questions

utham

o
Sep 4th, 2007
Identity is a SQL Server concept The better way to do is use the alter command
Sandip Bhattacharjee

o
May 12th, 2007
SQL> ALTER TABLE EMP ADD SR_NO INT IDENTITY(1,1) 2 ;ALTER TABLE EMP ADD
SR_NO INT IDENTITY(1,1)*ERROR at line 1:ORA-01735: invalid ALTER TABLE optionThe
above commands is not working. Pls specity what do you mean by identity(1,1)
Answer Question

Select Best Answer

AUG

272007

02:34 PM

1785
Views
1
Ans

Is it possible to use commit or rollback in exception section.


o

Chitendra ranjan

PL/SQL Interview Questions

archie123

o
Aug 28th, 2007
Yes you can use commit or rollback in exception block;select * from test123;A----------51 Declare s
varchar2(2); Begin update test123 set a = a+10; select a into s from test123 where a=20; exception...
Answer Question

AUG

Select Best Answer

272007

08:08 AM

1529
Views
0
Ans

How can I use the bind variable in a report to create an output


file. For example I give the starting date and end date. I would like

to get the report output in a file which has the start date and end
date in it's name.
o

sk

PL/SQL Interview Questions

Answer Question

FEB

182006

05:59 AM

4128
Views
5
Ans

Differentiate between %type and %rowtype attribute in Oracle


PL/AQL programming ?
o

skmishra_it

PL/SQL Interview Questions

jiten

o
Aug 27th, 2007
%type will use for to define at column level.%rowtype is used to define for one or more than one
columns ( like row or record or tuple ) means its user define type which hold one or more than one
columns along with it. and generally it used with Cursor.
srikanthvijay8

o
Jul 2nd, 2007
If you use a cursor, you can return cursor values only by rowtype only.
Answer Question

Select Best Answer

092004

SEP

06:04 AM

2158
Views
3
Ans

What are the PL/SQL Statements used in cursor processing ?


o
o

PL/SQL Interview Questions

DECLARE CURSOR cursor name, OPEN cursor name, FETCH cursor name INTO or
Record types, CLOSE cursor name.
fancyoracle

o
Aug 14th, 2007
There are two ways of processing a cursor output. These mainly depend on the type of cursor used.
Cursors can be1) Static
: Declared in declarations section with a defina...
geetha24

o
Feb 13th, 2007
FOR record_index IN [cursor_name | (SELECT statement)]LOOP executable_statement(s)END
LOOP;
Answer Question

Select Best Answer

202005

SEP

10:51 AM

1150
Views
4
Ans

How do you use cursor dynamically?


o

Kishorebabukm

PL/SQL Interview Questions

askvenki

o
Aug 12th, 2007
By using cursor parameters we can pass the value dynamically. So that cursor can fetch data as per
parameter
gopal

o
Dear sir,
deptno...

Jan 11th, 2006

declare

Answer Question

AUG

dep_num number;

cursor c(x number) is select * from emp where

Select Best Answer

082007

02:32 PM

1847
Views
0
Ans

How to export SQL XML using SQL or PLSQL or dynamic SQL for
Oracle data from Oracle database.
o

jakilati

PL/SQL Interview Questions

For example: I have 100's of tables and I need to take the data from database and export as a xml
file.
Answer Question

JAN

222007

08:07 AM

1277
Views
3
Ans

What is the alternative of using a 'WHERE CURRENT OF 'Clause


in a plsql statement ?
o

Tejaswini

PL/SQL Interview Questions

lieni

o
Jul 30th, 2007
You add the psedocolumn rowid to the selected fields of the cursors body.This rowid identifies the
selected record uniquely so that you can update with it, like with the primary key (just faster).Update
tab where rowid=cur_rec.rowid;
nagurtilak

o
Mar 15th, 2007
It can be used in cursorsIf we want to update the current record (i.e cursor holding the current
record) we can use WHERE CURRENT clauseEg. UPDATE empSET sal=sal*10FROM emp
WHERE CURRENT of "cursor name"
Answer Question

MAR

Select Best Answer

202006

05:31 AM

1516
Views

5
Ans

How to fetch the rows by dynamicaly passing table name through


cursor
o

sweety

PL/SQL Interview Questions

lieni

o
Jul 30th, 2007
Yes you can pass the whole select statement of the cursor dynamicaly, see ref_cursors.There is also a
system package sys.dbms_sql which allows everything to make dynamically.
CHINMAY

o
Jun 27th, 2007
Yes,You are right we can only pass the value for where clause in paramterised cursor
Answer Question

JUN

Select Best Answer

222007

06:03 AM

913
Views
1
Ans

Is there any way to protect PL/SQL code?


o

Ashish Kumar Mohanty

PL/SQL Interview Questions

rsundararajan_in

Jul 30th, 2007

By using wrapper class pl sql code can be protected.

Answer Question

Select Best Answer

302006

MAY

05:12 AM

2074
Views
4
Ans

How can I speed up the execution of query when number of rows


in the tables increased
o

Parag

PL/SQL Interview Questions

Srinivasa Bhargava

o
Jul 27th, 2007
You have to index the columns properly and make sure that driving columns of the composite
indexes are used in the query .You may as well wish to rebuild indexes as the number of records is
increased.
Syed Jawahar

o
May 31st, 2006
HIYOU CAN SPEED UP THE QUERY BY USING THE ROWID IN THE SELECT STATEMENT.
Answer Question

APR

04:51 AM

Select Best Answer

242007

1852
Views
1
Ans

What is the difference between binary_integer and plsql_integer


o

srikanth kumar

PL/SQL Interview Questions

Kamal Mohapatra

o
Jul 23rd, 2007
You must be speaking about PLS_INTEGER. PLS_INTEGER, uses machine-arithmetic unlike
BINARY_INTEGER which uses library arithmetic. As such PLS_INTEGER is somewhat faster than
BINARY_INTEGER. Also BINARY_INTEGER has subtypes. I don't think PLS_INTEGER has
subtypes

SEP

292006

01:09 PM

4345
Views

4
Ans

1.What is bulk collect?2.What is instead trigger3.What is the


difference between Oracle table & PL/SQL table?4.What R built in
Packages in Oracle?5.what is the difference between row
migration & row changing?
o

mathewsumoth

PL/SQL Interview Questions

askvenki

Jul 20th, 2007

rowchaining works for varchar2 datatype which will allocate memory dynamicallysuppose
thier is column name varchar2(20);first value-- venki which is 5changed to venki12 which is
7then oracle will cr...
rampratap409

Oct 13th, 2006

Hi Shashank,Can you explain instead off trigger, DML Trigger and views..
Answer Question Select Best Answer

JUN

062006

01:58 PM

2736
Views

7
Ans

Why do we need to create a force view?what is its purpose?give


some examples?
o

rajanipriya

PL/SQL Interview Questions

askvenki

Jul 19th, 2007

The force view can be created before base table is created .when the table is createdit is
automatically activated.we can create base table with any structure
Mohamed Irfan
o

Dec 26th, 2006

Hi, Force views are created in real time environment as per the business needs because
of two specific reasons1. If the structure of the base table is not completely known (ie) ...

Answer Question Select Best Answer

DEC

212005

02:55 AM

2780
Views

3
Ans

What is meant by tuning and tk proof?


o

suneel

PL/SQL Interview Questions

vinit
o

Jul 12th, 2007

tkproof is a oracle utility. it gives information about following


parameters.********************************************************************************count
number of t...

madhug56

Jun 12th, 2007

Can you tell me something more about tk proof?? I mean how do we give input and what is
the output?
Answer Question Select Best Answer

312007

MAY

01:59 AM

852
Views

3
Ans

TEMP
column1
1
2
4
7
5
so in this table i want search missing number from 1 to 10.
so output should be
3
6
8
9.
how to get this o/p?">

In my table "temp" one column contain 1 to 10 range of values in


between some numbers are missing. like
belowTEMPcolumn112475so in this table i want search missing
number from 1 to 10.so output should be 3689.how to get this
o/p?
o

santo

PL/SQL Interview Questions

chakraborty_sarkar

Jul 10th, 2007

SELECT LEV FROM (SELECT LEVEL LEV FROM dual CONNECT BY LEVEL < 10)
WHERE LEV NOT IN (SELECT COLUMN1 FROM TEMP);
Amit
o

Jun 14th, 2007

If I have Emp Table and id column


1
2
4
5
7
SELECT 10-id FROM Emp WHERE id in (SELECT id FROM Emp WHERE id 5)

Answer Question Select Best Answer

082007

JUL

05:03 AM

1330
Views

0
Ans

What is difference between records group and objects group?


o

ravindra

PL/SQL Interview Questions

Answer Question

SEP

092004

06:04 AM

2249
Views

2
Ans

What happens if a procedure that updates a column of table X is


called in a database trigger of the same table ?
o
o

PL/SQL Interview Questions

Mutation of table occurs.

rudra pratap
o

Jul 5th, 2007

In order to avoid mutation table error we need to have a row level as well as a statment
level trigger.
Sunil Yadav
o

Oct 26th, 2005

To avoid the mutation table error ,the procedure should be declared as an AUTONOMOUS
TRANSACTION.By this the procedure will be treated as an separate identity.
Answer Question Select Best Answer

MAR

272007

02:51 PM

921
Views

1
Ans

What is the PL/SQL statement for retrieving the date?


o

ramya_adina

PL/SQL Interview Questions

jamesravid

Jul 5th, 2007

You can use SYSDATE oracle.lv_today := sysdate;or select sysdate into lv_today from
dual;both the statements assign sysdate to lv_today
Answer Question Select Best Answer

262007

MAY

06:34 AM

1348
Views

1
Ans

What is the difference between the internal table and table? What
is the difference between the cluster, pooled,& transparent?What
is the difference between the native & open sql?
o

rajendra

PL/SQL Interview Questions

Meera
o

Jul 4th, 2007

The internal table is a table which is getting filled during the run time of the program...and
after that there wont exist any value in that internal table whereas table is the one which
contains data permanently
Answer Question Select Best Answer

JAN

222007

01:28 AM

1342
Views

5
Ans

What will happen to an anonymus block,if there is no statement


inside the block?eg:-declarebeginend;
o

joe

PL/SQL Interview Questions

visitor
o

Jul 3rd, 2007

If you do not want any executable statement within the begin-end block, you can include a
null statment.eg:begin null;end;
Chiranjit Dutta
o

Feb 27th, 2007

We cant havedeclarebeginendwe must have something between the begin and the end
keywordsotherwise a compilation error will be raised.
Answer Question Select Best Answer

MAR

212006

01:11 AM

957
Views

3
Ans

Is it possible that we can make a query to search the data


Umair Tariq">

Hello,I need some info, that is it possible to find or make query


,that if we know the data stored in a table but don't know the field
name in which the required data is stored.ExampleTable having
fields like columnA, columnB, columnC, columnD,..........columnN
and all have the same dataType. and you dont know in which
field your data exists.suppose some data like e.g. "BackMan"
exists in any Field of the table but we don't know in which Field
this information is store.Is it possible that we can make a query
to search the dataUmair Tariq
o

umair_mughal

PL/SQL Interview Questions

Chinmay
o

Jun 27th, 2007

Yes,you can do by using like with orlike select * from tab1where col1 like '%back%' or col2
like '%back%'or col3 like '%back%'or col4 like '%back%'
RoulRaj
o

May 11th, 2007

Hello Guna Sagar,


Please give one example i.e without knowing the column name one can write a query.
Regards
Roul
Answer Question Select Best Answer

JAN

052006

08:59 AM

2348
Views

3
Ans

What is the difference between sql/pl-sql/embeded sql?


o

arunima

PL/SQL Interview Questions

madhug56

Jun 12th, 2007

SQL is a structured query language.Used to perform operations such as


retrieval,updations,insertions etc. on database.PL/SQL is a Programming language which is
an extension for SQL with control struct...
psom
o

Jun 8th, 2006

Embedded SQL - SQL statements are invoked from a host environment like C/C++, Java
or any other programming languages.
Answer Question Select Best Answer

SEP

092004

06:04 AM

2681
Views

2
Ans

Name the tables where characteristics of Package, procedure


and functions are stored ?
o
o

PL/SQL Interview Questions

User_objects, User_Source and User_error.


idonknowyou

May 22nd, 2007

The Data dictionary tables/ Views where the characteristics of subprograms and Packages
are stored are mentioned belowa) USER_OBJECTS, ALL_OBJECTS, DBA_OBJECTSb)
USER_SOURCE, ALL_SOURCE, DBA_SOURCEc) USER_DEPENCENCIESd)
USER_ERRORS, ALL_ERRORS, DBA_ERRORS
vinod kumar
o

Nov 16th, 2005

User_source , user_object , user_errors


Answer Question Select Best Answer

SEP

06:04 AM

092004

2227
Views

2
Ans

Explain how procedures and functions are called in a PL/SQL


block ?
o
PL/SQL Interview Questions

Function is called as part of an expression. sal := calculate_sal ('a822'); procedure is called as a


PL/SQL statement calculate_bonus ('A822');
idonknowyou

May 22nd, 2007

Procedure can be called in the following waysa) CALL <procedure name> direcb)
EXCECUTE <procedure name> from calling environmentc) <Procedure name> from other
procedures or functions...
M.KUMARAN
o

Nov 12th, 2005

Function is called as part of an expression. sal := calculate_sal ('a822'); procedure is


called as a PL/SQL statement calculate_bonus ('A822');KKK
Answer Question Select Best Answer

MAR

272007

02:20 AM

1498
Views

1
Ans

DECLARE A EMP.ENAME%TYPE; B EMP.SAL%TYPE;BEGIN


UPDATE EMP SET SAL=SAL*1.1 WHERE EMPNO=&EMPNO;
__________ ENAME, SAL INTO A, B FROM EMP;END;What
should I write in that blank to get the details of just updated
record???
o

Samatha

PL/SQL Interview Questions

gopichandv2002
o

May 22nd, 2007

You should write returning in the blank place


Answer Question Select Best Answer

012007

MAY

02:47 AM

932
Views

1
Ans

What happens if we don't write any thing between BEGIN and


END in a procedure? If it show error than how can we execute
this code error free?
o

vardan

PL/SQL Interview Questions

RoulRaj
o

May 11th, 2007

There should be atleast one statement in between Begin and End.The Statement may be
Null statement also.Syntax:declarebeginnull;end;RegardsR.K.Roul

Answer Question Select Best Answer

JUN

012006

11:05 AM

4418
Views

2
Ans

What is the purpose of FORCE while creating a VIEW


o

Rampeasad K

PL/SQL Interview Questions

RoulRaj
o

May 9th, 2007

Dear Rajeswaran,Please give one example(application ) where one can use force
view.Thanks & regards
Rajeshwaran
o

Jun 3rd, 2006

usually the views are created from the basetable if only the basetable exists.The purpose of
FORCE keyword is to create a view if the underlying base table doesnot exists.ex : create or
replace FORCE ...
Answer Question Select Best Answer

APR

112007

02:38 AM

1466
Views

1
Ans

What is Cost based Optimization and Rule Based Optimization


o

Ramkumar Singh

PL/SQL Interview Questions

What is the differences between it.


norman

May 8th, 2007

Rule Based Optimization is an older technique which is used for optimization of queries but
follows a fixed rule or strategy for achieving the same. But in contrast cost Based
Optimization is a later ...
Answer Question Select Best Answer

MAR

192007

01:46 AM

2847
Views

1
Ans

How to avoid the mutating error with sample program


o

ily_saravanan

PL/SQL Interview Questions

Hi, can any body give me the sample program for avoiding the mutating error. we can avoid the mutating
through the statement level trigger instead of using the statement leve trigger, i need one sample program
to avoid the mutating error by using pl/sql table.Thanks Saravanan.P
KiranKW

May 2nd, 2007

A mutating error comes when u r trying to do some DML operation on a table that owns the
trigger.... there are a lot of options to avoid mutation .. eg, Making it autonomous
transaction...
Answer Question Select Best Answer

JAN

232007

08:06 AM

1052
Views

1
Ans

PL/SQL Procedure Send mail problem


o

lalit4untl

PL/SQL Interview Questions

Hi all I wrote a procedure to send email via plsql procedure, It was compiled successfully but not
working ....
here is the code (actuly i added the dbms output like step1 ,step 2 to see in which step the control is
going on )
PL/SQLcreate or replace PROCEDURE send_test_message
IS
mailhost VARCHAR2(64) := 'mail.cmcltd.com';
sender VARCHAR2(64) := 'akash.sharma@cmcltd.com';<br...< p=""></br...<>
KiranKW

May 2nd, 2007

Hi, I dont see any problem with your code ... try to capture the return code for each of the
calls ... that will help to identify the exact problem
Answer Question Select Best Answer

APR

102007

06:11 AM

3787
Views

1
Ans

What is CODEX function?


o

A.Jyothsna

PL/SQL Interview Questions

ramnath123

Oct 21st, 2011

Code + decode
Code
o

code

decode

2.

Can we use commit in trigger and cursors?


o

manali

PL/SQL Interview Questions

Apr 9th, 2007

mohan

CREATE OR REPLACE TRIGGER t_trigger AFTER INSERT ON t1 FOR EACH ROW


DECLARE PRAGMA AUTONOMOUS_TRANSACTION; i PLS_INTEGER; BEGIN
SELECT COU...
mohan kumar
o

Apr 9th, 2007

Yes We can use commit statement in triggers with 10G.Here is example :CREATE OR
REPLACE TRIGGER t_trigger AFTER INSERT ON t1 FOR EACH ROW DECLARE
PRAGMA AUTONOMOUS_TRANSA...
Answer Question Select Best Answer

3. MAR

222007

03:19 AM

2222
Views

3
Ans

How to disable a trigger for a particular table ?


o

Pavan

PL/SQL Interview Questions

Suppose if i have 8 triggers declared for a table..how to disable a single trigger from a table...i don't want
to disable all triggers for a table. I know we can disable all triggers by using "alter table disable all
triggers;". just i want to know how to disable single trigger from a table.
Pavan
o

Apr 3rd, 2007

Thanks parweej, alter trigger <trigger-name> disable worked for me..


subbaraovangalli

Mar 26th, 2007

To disable a perticular trigger on a table

alter table disable trigger

Answer Question Select Best Answer

4. MAR

012007

02:28 PM

1196
Views

2
Ans

How do you debug the PL/SQL ?


o

ddkdhar

PL/SQL Interview Questions

subbaraovangalli

Mar 26th, 2007

by using
show_errors we can see the errors in the prev created procedure.
dbms_output.put_li...
deep_paudel

Mar 12th, 2007

DBMS_OUTPUT.put_line
Answer Question Select Best Answer

5. MAR

192007

01:43 AM

1277
Views

1
Ans

Oracle referance cursor code


o

ily_saravanan

PL/SQL Interview Questions

Hi,1. Iam looking for sample program for ref cursor. ref cursor can be associated with many select
statements and we can use the ref cursor to return the multiplevalue from the procedure or function.
how to use the ref cursor in a program to associate with many select statements.2. we can't use the
%rowtype attribut to return the multiple from the procedure or function instead of ref cursor. if we...
krishnamohan_geek

Mar 25th, 2007

Hi,Let me answer your second questin first. Why ref cursor instead of %ROWTYPE.
%ROWTYPE is used for fetches record/row of a single table.OR in case of columns of
different tables then you have to crea...
Answer Question Select Best Answer

6. MAR

212007

07:54 PM

2581
Views

2
Ans

Explain how DDL commands used in a procedure or function?


o

madhug56

PL/SQL Interview Questions

Nikhil_4_Oracle
o Mar 23rd, 2007

HI ALL,try this..,create or replace procedure ddl_proc(tabname in varchar2)asv_cursor


INTEGER;ddl_exe
INTEGER;beginv_cursor:=Dbms_sql.open_cursor;Dbms_sql.Parse(v_cursor,' Create Table
'||tabn...
Anurag Puranik
o Mar 23rd, 2007

We can use DDL commands in Procedure & Functions through "EXECUTE IMMEDIATE "
Command
Answer Question Select Best Answer

7. JAN

07:35 AM

162007

975
Views

2
Ans

I wanted to know how to move backwards while scanning recods


in a cursor when meeting with a perticular condition.For
example, if after scanning 50th record of a recorset, I have to
make some updates in 25th record. How to go about it?
o

Vikas Somwani

PL/SQL Interview Questions

Shiril Kumar Dubey


o Mar 21st, 2007

IT can only be possible through the collections.... go through the chapater NO 12 PL/SQL
O'reiilly Publications.
ram
o

Feb 18th, 2007

Cursors are forward only, as such you can't go back.


Answer Question Select Best Answer

8. DEC

142006

05:22 AM

1483
Views

1
Ans

Explain how Nested loops gets executed?


o

SAGAR

PL/SQL Interview Questions

Mar 18th, 2007

Instrument

A nested loop is a loop within a lop, an inner loop within the body of an outer one. How this
workds is that the first pass of the outer loop triggers the innter which executes to
completion. Then the...
Answer Question Select Best Answer

9. JAN

312007

06:19 AM

1053
Views

6
Ans

Suppose one table contain many identical records. Then how to


delete only identical Records.
o

globalanil18

PL/SQL Interview Questions

Nikhil_4_Oracle
o Mar 12th, 2007

Hey,Above Soln is not working with tables where data is like,COL1 ----------1511 *708111
*5511 *78--Here 11 Repeats 3 times fine...--Check d rowidselect rowid,col1 from
nodup;ROWID ...
suni123

Mar 5th, 2007

Hi,To delete duplicate rows from table EMPDELETE FROM EMP WHERE ROWID NOT
IN
(SELECT MAX(ROW...

Answer Question Select Best Answer

292006

10. MAY

01:33 AM

1301
Views

2
Ans

What are the different types of collections supported in Oracle?


PL/SQL datatypes TABLE and VARRAY, allow us to declare the
collections nested tables, associative arrays, and variable-size
arrays.
o

baskaranprasad

PL/SQL Interview Questions

BASAVARAJ KOLUR
o Mar 8th, 2007

plsql supports mainly 3 types of collections 1> index by binary_integer


3>varrays index by binary_integer and nested...
Gupta
o

Aug 7th, 2006

Types are Index -by- table, Nested Tables and Varray!


Answer Question Select Best Answer

11. JUN

282006

01:20 AM

866
Views

2> nested table

8
Ans

Hi all,Could anyone let me know the equivalent code in pl/sql for


this java code? I really appreciate that.for (int i = 0; i < 10; i++) {if
(i == 5){continue;}} thanks,kamalnayan.M
o

kamalnayan.M

PL/SQL Interview Questions

ravikumarzee@gmail.com

Mar 8th, 2007

begin for i in 1..10 loopif i 5 then -- do stuff.end if;end loop


madhu
o

Feb 9th, 2007

I hope this will work..


declare
i number(2);
Begin
for i in 1.. 10
loop
if (i ==5) then
else
exit;
end loop;
end;
Answer Question Select Best Answer

12. SEP

152006

01:55 PM

1712
Views

6
Ans

If there is an index including three columns A, B and C. And if we


issue a query in which where clause uses only column B....will
the index be useful??and what if the where clause only has
coulmn A..will the index b useful??
o

smita

PL/SQL Interview Questions

madhaviguthula

Mar 8th, 2007

Hi Hemant, Please go through the following code for better understanding.First, create and
populate a test table with a concatenated index.CREATE TABLE test_objects ASSELECT *
FROM all_objects;CREATE...
hemant.agarwal03
o Mar 8th, 2007

Hi Madhvi..How we will use that one special feature?Regards,Hemant


Answer Question Select Best Answer

13. MAR

072007

09:29 AM

2579
Views

1
Ans

What is the use of NOCOPY Compiler Hint while writing PL/SQL


procedures/subprograms???

skdash78

PL/SQL Interview Questions

Mar 7th, 2007

ahamed79

Pls try this link:http://www.databasejournal.com/features/oracle/article.php/1558021CheersFaizal


Answer Question Select Best Answer

14. MAR

012007

02:23 PM

1402
Views

2
Ans

Select from A table through cursor and update B table. If it


updates successfully then insert into another table. Handled
every type of exception in the code?
o

ddkdhar

PL/SQL Interview Questions

Mar 6th, 2007

ddkdhar

Question was not clearsorrythis is my questionupdate a table A using cursor if it updated


then insert into another table B.if not insert into same table A and insert into B.handle every
exceptions in the code.nikhil ok
Nikhil_4_Oracle
o Mar 6th, 2007

Hi ddkdhar,Can you please explain bit more what you are requirement
is?In such a case only NO_DATA_FOUND, or INVALID_NUMBER Exceptions are
encountered,well you can always say that,When Others Then Print sqlcode ,
sqlerrm....Thanks,Nikhil

Answer Question Select Best Answer

15. MAR

012007

02:24 PM

2308
Views

3
Ans

Is it possible create table in procedure or function? If Not Why?


o

ddkdhar

PL/SQL Interview Questions

Mar 6th, 2007

ddkdhar

One thing nikhil handle sqlerrm with variables .that increases perfmance ok.
ddkdhar

Mar 5th, 2007

Thank you very mech nikhil


Answer Question Select Best Answer

16. FEB

152007

02:25 AM

1896
Views

1
Ans

How to insert a music file into the database


o

rakheeviyyapu

PL/SQL Interview Questions

Mar 2nd, 2007

Innila

LOB datatypes can be used to store blocks of unstructured data like graphic images,
audio, etc

video

Answer Question Select Best Answer

212006

17. JUL

03:55 PM

3690
Views

2
Ans

How to trace PL/SQL Package?How to trace PL/SQL procedures?


How to trace SQL statement?what is DBMS_TRACE? How to
use?SET AUTOTRACE ON; ?If anyone tell me how we can use
trace and create log that would be great?
o

rana

PL/SQL Interview Questions

Feb 22nd, 2007

sunflower

DBMS_TRACE package can be used to keep track of the calls between the subprograms
and trace of execution by sub-program, procedures, functions or an exception. It gives a
large amount of trace da...
Jian Zhang

Oct 10th, 2006

When you want to see the execute plan of a SQL statement, you need to use TRACE
function of Oracle .
Answer Question Select Best Answer

18. FEB

092007

08:58 PM

2074
Views

2
Ans

How to display the contents of a current record fetched in a


reference cursor?
o

madhuk17

PL/SQL Interview Questions

Feb 17th, 2007

Vishakha

declare cursor v_cursor is


10;begin
open v_cursor;

select empno, empnm, empdept from emp where empdept =


...

geetha24

Feb 13th, 2007

To display the cursorOPEN v_cursor FOR SELECT ename, empno, deptno FROM emp
WHERE deptno = p_deptno ORDER BY ename;LOOP FETCH v_cursor INTO v_ename,
v_empno,...
Answer Question Select Best Answer

19. JAN

01:50 AM

302007

1936
Views

1
Ans

What are the Limitations of Packages,views,procedures?What is


the maximum number of subprograms inside a package?
o

joseph

PL/SQL Interview Questions

Feb 9th, 2007

geetha24

There is no limitation on the number of Subprograms in the package, but there is a limitation
on the compiled file size in the database.
Answer Question Select Best Answer

20. DEC

252006

07:59 AM

1055
Views

2
Ans

How can we call a function from an anonyms block?


o

Anuruddha SINGH

PL/SQL Interview Questions

Feb 8th, 2007

madhuk17

We can call a function from anonymous block as a part of sql statement written in that
block.eg: create or replace function fn_emp(v_empno in number)return varchar2
isbeginselect ename into v_ename fr...
rajnish123

Dec 30th, 2006

hi,suppose a function add two number and you desire to call it from anonyms block.create
or replace function f_add(a in number,b in number) return number asc number;beginc:=
a+b;return (c);end;t...
Answer Question Select Best Answer

21. JAN

232007

05:37 PM

830
Views

2
Ans

Hi,Can somebody please answer couple of my questions ASAP?


1) How do you call a trigger on a table?2) What is the maximum
number of data strings that can be returned through
DBMS_OUTPUT?Much thanks!!
o

Lisa

PL/SQL Interview Questions

Feb 7th, 2007

madhuk17

Hi,I think trigger is not called.The code in the trigger defines the action the database needs
to perform whenever some database manipulation (INSERT, UPDATE, DELETE) takes
place.I think maximum number of data strings that can be returned through
DBMS_OUTPUT is 255 bytes.
gchandra_sekar

Feb 7th, 2007

Hi!) Trigger cannot be called as it automatically gets activated once u touch the table.2)
Prior 10g user SQL> set serveroutput on size 1000000 or if it is 10gORA10GR2> set
serveroutput on size unlimited
Answer Question Select Best Answer

Sort by:
Answers
|
Date
Jump to Page:
24

NOV

032006

11:22 PM

7914
Views
3
Ans

1.what is difference between pl/sql table and records?2. what is


the advantages of pl/sql table?3. what is ref cursor? what is the
advantages of ref cursor
o

ily_saravanan

PL/SQL Interview Questions

srini

o
Feb 6th, 2007
Actually explicit cursor refers only one work area in memory ,incase of ref cursor refers different
work areas in memory.
ranjeetapegu

Jan 12th, 2007

Difference between Pl/sql tables and record is that in pl/sql tables we can store more than one row
whereas in record we store only one row.TYPE rec_emp is RECORD( ename varchar2(10), empn...

Answer Question

NOV

Select Best Answer

152006

12:01 PM

994
Views
2
Ans
row level,statement level,before,after,insert,update,delete 3*2*2 total 12 types.
and can i even mention instead of triggers,database trigger and schema triggers">

If anyone asks in interviews, about "what are the types of


triggers" then my ans is likerow level,statement
level,before,after,insert,update,delete 3*2*2 total 12 types.and can
i even mention instead of triggers,database trigger and schema
triggers
o

oradev

PL/SQL Interview Questions

Sagar Sai

o
Feb 4th, 2007
Hi,There are 3 types of triggers available in the Database. They are 1.DML Triggers :- These are
again 12 types like .. Before INSERT,UPDATE,DELETE and After INSERT...
Pawan Ahuja

o
Dec 3rd, 2006
there are three types of triggers in pl/sql1.)DML triggers2.)instead of triggers3.)system event
triggersRegardsPawan Ahuja
Answer Question

Select Best Answer

JAN

172007

05:42 AM

1450
Views
1
Ans

Wheather a Cursor is a Pointer or Reference?


o

Apan Motilal

PL/SQL Interview Questions

saurabh kumar verma

o
Jan 19th, 2007
Cursor is basically a pointer as it's like a address of virtual memory which is being used storage
related to sql query & is made free after the values from this memory is being used.
Answer Question

FEB

Select Best Answer

082006

02:39 AM

6872
Views
5
Ans

What is the Scalar Data type in PL/SQL?what is the forward


decleration in packages?what is the usage of IN,OUT,INOUT
parameters in Procedures or functions?
o

chiranjeevi reddy

PL/SQL Interview Questions

Guest

o
Jan 16th, 2007
A forward declaration looks like the package definition part but is inside the bode.e.g.procedure A
isbegin B;end A;procedure B isbegin null;end B;will not work, because during call to B B...
Donald H. Kirschman

o
Dec 27th, 2006
Scalar data types store one single element of data, as opposed to composite data types. This is not a
concept that is unique to Oracle PL/SQL; rather, it is common to any programming language.&n...
Answer Question

JAN

Select Best Answer

112007

04:34 AM

907
Views
1
Ans

Hi all if i can assign any value to the out parameter in procedures


.... like i had created this procedure ...CREATE ORE REPLACE
PROCEDURE MODETEST ( PARAMETER OUT
NUMBER)ISJUSTTEST NUMBER :=20;BEGINPARAMETER
:=JUSTTEST ; *HERE I ASSIGN VALUE TO OUT PARAMETER
*JUSTTEST :=
PARAMETER;dBMS_OUTPUT.PUT_LINE(JUSTTEST);END; AND

THE PROCEDURE IS CREATED WITHOUT ANY ERROR BUT I


THAUGHT THE OUT PARAMETERS ARE WRITE ONLY AND WE
CANT ASSIGN ANY VALUE TO IT ....
o

GANESH

PL/SQL Interview Questions

Brajesh Singh Bhadoriya

o
Jan 15th, 2007
hi...actually the IN parameters are the read only parameters hence we can't assign any value to them
but for out parameters its not true, as we can assign value to OUT parameters. so the procedur...
Answer Question

OCT

Select Best Answer

072006

05:48 AM

1692
Views
4
Ans

Can we create a table using with Procedure or Function?wat is


the Mutating trigger error?
o

raju

PL/SQL Interview Questions

sankari

o
Jan 9th, 2007
We can do as shown below... in the same way we can drop the table..
DECLARE
BEGIN
EXECUTE IMMEDIATE 'create table employee(empno number(3),ename varchar2(10))';

END;
gangadharam.p

o
Dec 26th, 2006
HI, table can be created by using either dbms_sql or EXECUTE_IMMEDIATE in procedure or
function.
Answer Question

OCT

Select Best Answer

242006

04:47 PM

963
Views
2
Ans
table is also there "phone" with phoneno as a field but table is empty.now i want the result into
table2.
got it, Right!
Let me know if u have any questions.
thanks.
dev
">

Hi all,thank u for ur answers.and i have an adjustment in this


question.actually data is not present in a table, it's there in some
file.For eg. "Data" is the file, it contains information:
2489078905,2345678909 and so on...table is also there "phone"
with phoneno as a field but table is empty.now i want the result
into table2.got it, Right!Let me know if u have any
questions.thanks.dev

dev

PL/SQL Interview Questions

gangadharam.p

o
Jan 6th, 2007
Hi, write a control file to dump the data from file to table using SQL*LOADER or use UTL_FILE
to do the same.
jamesravid

o
Dec 12th, 2006
Use "sql loader" to limport flat file data to database tables.
Answer Question

NOV

Select Best Answer

052006

01:04 AM

1118
Views
2
Ans

Dear friend, my question is assume that we have created on


table,on that table we are creating one view and one synonym
know i have drop the table then status of view is invalid but
status of synonym is not invalid pls give me the answer
o

basukolur014

PL/SQL Interview Questions

gangadharam.p

o
Jan 6th, 2007
hi, when u do so the view gets error and synonym becomes invalid. If u create a table again with
same name but with different cols the synonym will work but view wont.bcz view is the stored...
raghgu

o
Nov 16th, 2006
Hi friend, As per RDBMS rule we cannot have invalid synoym, but we can have a invalid view.
Answer Question

DEC

Select Best Answer

182006

10:33 AM

1247
Views
1
Ans

Example:
declare
cursor CSRtest is
select *
from emp
for update of lastname;
begin
for i in CSRtest loop
...do something
...call procfedure with "commit"
update emp set lastname = "..."
where current of CSRtest;
endloop;
Results in "ORA-01002: fetch out of sequence" because curser is closed after "Commit"
How to "save state of curser" ?
Any workaround?">

How to run a curser for update "with hold2 in PL/SQL ?


Example:declarecursor CSRtest is select * from emp for update
of lastname;beginfor i in CSRtest loop...do something...call
procfedure with "commit"update emp set lastname = "..." where

current of CSRtest;endloop;Results in "ORA-01002: fetch out of


sequence" because curser is closed after "Commit"How to "save
state of curser" ?Any workaround?
o

Stefan

PL/SQL Interview Questions

gangadharam.p

o
Jan 5th, 2007
Hi, It is very good query u asked.The work around is, it is not advisable to use a COMMIT inside
the loop as it invalidates the cursor which is declared for update.If u want to use commit then d...
Answer Question

DEC

Select Best Answer

192006

07:36 PM

1123
Views
1
Ans

Can you create table,view or sequence in pl/sql code block


o

vasudev

PL/SQL Interview Questions

Manikandan

o
Dec 24th, 2006
Use execute immediate to write DDL statements.but you should have create system previlege on the
schema.
Answer Question

AUG

Select Best Answer

172006

06:45 AM

4146
Views
6
Ans

What are the Restrictions on Cursor Variables?Thanks Ramki,


Hyd, TCS
o

RamaKrishna.Yerra,TCS,Hyd,9989018508

PL/SQL Interview Questions

Ashwini

o
Dec 23rd, 2006
Cursor Variable RestrictionsCursor variables are subject to the following restrictions; Oracle may
remove some of these in future releases. Cursor variables cannot be declared in a package since
they ...
rashid

o
Sep 20th, 2006
hi friend cursor variable can't use with dynamic sql.cursor variable can't use with in package because
it is not having persistent state.nulls can't assinged to cursor variable.remote procedure can't accept
cursor variable
Answer Question

DEC

Select Best Answer

072006

05:30 PM

969
Views
2
Ans

I have to replace a particular value say "_" with a space in


particular column of a table, kindly provide me the query how to
achieve this.
o

Pattabiraman

PL/SQL Interview Questions

Guest

o
Dec 12th, 2006
Actually your question is not clear. Do u want to change column name or values in the column?to
change a values it is quite simple.select replace('replace_underscores_with_spaces','_',' ') from dual;
Gupteshwar

o
Dec 9th, 2006
You can use REPLACE function in order to replace a digit or character in a
column.SELECT REPLACE(col1, '_', ' ') FROM table_1.This function can also be used to update
column's records.Try this function. Hope it would work.
Answer Question

OCT

Select Best Answer

152006

04:00 PM

2080
Views
1
Ans

We have on delete cascade in Oracle but we don t have on


update cascade. If you compare Oracle with SQL Server in SQL
Server we have the option called on update cascade but In Oracle
we dont have this option why? Please can you just clarify my
doubt?

inam

PL/SQL Interview Questions

jamesravid

o
Dec 12th, 2006
There is no "update cascade" functionality in oracle. But you can develop your own code to achieve
this. The source code is also available in this
urlhttp://asktom.oracle.com/tkyte/update_cascade/index.html
Answer Question

Select Best Answer

282006

SEP

03:08 AM

1306
Views
3
Ans

How can I create a new table by using other two table's values.
o

Anish

PL/SQL Interview Questions

rampratap409

o
Dec 9th, 2006
create table new_employeesas (select e.employee_id, e.first_name, e.last_name, d.department_name,
d.department_id,c.location_id, c.city from employees e, departments d, locations cwhere
e.department_id = d.department_idand d.location_id = c.location_id);
Shree

o
Oct 11th, 2006
Create table table_name as( select tab1.column1,tab1.column2,tab2.column3 from table_name
tab1,table_name2 tab2 where tab1.colum1=tab2.column4);
Answer Question

NOV

Select Best Answer

162006

03:12 PM

2483
Views
2
Ans

What are the types of triggers in PL/SQL and in forms?in pl/sql,


My guess is:row level, statement
level,before,after,insert,update,deleteare there any triggers i
missed, let me know?Thanks in advance.
o

dev

PL/SQL Interview Questions

Pawan Ahuja

Dec 3rd, 2006

In forms eigth types of trigger.1) Block_Processing Triggers, 2) Interface event triggers, 3)


master/Detail Triggers, 4) navigational Triggers, 5) Query_time triggers, 6) Transactional Triggers ...
Anusha

o
Nov 23rd, 2006
1) Block_Processing Triggers, 2) Interface event triggers, 3) master/Detail Triggers, 4) navigational
Triggers, 5) Query_time triggers, 6) Transactional Triggers 7) Validational Triggers 8)
Message_handling Triggers 9)When_New_Instance Triggers
Answer Question

NOV

Select Best Answer

232006

04:12 AM

2263
Views

0
Ans

Hi How do I call procedures which have ref cursors as


parameters and print the elements in the ref cursor in PL/SQL
Developer ?I executed the following code in PL/SQL Developer :
CREATE OR REPLACE PACKAGE EMP_PACK ASTYPE
EMPCURTYP IS REF CURSOR RETURN EMP
%ROWTYPE;PROCEDURE EMP_PROC( EMP_CUR IN OUT
EMPCURTYP);END EMP_PACK;CREATE OR REPLACE
PACKAGE BODY EMP_PACK ASPROCEDURE
EMP_PROC(EMP_CUR IN OUT EMPCURTYP) ISBEGINOPEN
EMP_CUR FOR SELECT * FROM EMP;END EMP_PROC;END
EMP_PACK;/When I executed the following command , I got the
following statementSQL> variable var refcursor;REFCURSOR not
supportedThe same statement is working in SQL*Plus
environmentHow is it to be executed in PL/SQL Developer ?
o

Divya

PL/SQL Interview Questions

Answer Question

AUG

112006

03:07 PM

3118
Views
5
Ans

How to disable multiple triggers of a table at at a time?


o

shavali

PL/SQL Interview Questions

Raghavendra

o
Nov 19th, 2006
Alter table disable all trigger;
Brijesh Mishra

o
Oct 9th, 2006
SQL> Spool c:tempdisable_all_triggerSQL> Select 'ALTER TRIGGER '|| trigger_name ||' disable;'
from user_triggers;SQL> spool offafter that open file disable_all_trigger.lst and remove header part
and save file.SQL>@c:tempdisable_all_trigger.lst
Answer Question

JUL

Select Best Answer

262006

04:20 PM

1081
Views
4
Ans

I have written a procedure in which the cursor is fetching 2 lakh


records. I would like to pass on these 2 lakh records as an in
paramter to the other procedure. How can we achieve this logic?
o

Srinivas

PL/SQL Interview Questions

prakash

o
Nov 15th, 2006
Hi,
I would suggest not to pass all the records to you next procedure. You should look to
redesign your next procedure so that it accepts one record and proce...

prasanna

o
hi friend

Nov 14th, 2006

of course no need of sending 2lakh records but some records whatever i required

Answer Question

NOV

Select Best Answer

142006

04:36 AM

1270
Views
0
Ans

What is the syntax for ref cursor working with forms 6i?
o

PRIYABRATA ROY

PL/SQL Interview Questions

Answer Question

OCT

172006

07:22 AM

1159
Views
1
Ans

Can i change the elements of listitems at runtimes?

jagannath kar

PL/SQL Interview Questions

youranjani

o
Oct 26th, 2006
Hi.. We can change the elements of listitems at runtime with the help of Record Group
Answer Question

Select Best Answer

Showing Questions 461 - 480 of 511 Questions


First | Prev | Next | Last Page
Sort by:
Answers
|
Date
Jump to Page:
24

Sort by:
Answers
|
Date
Jump to Page:
25

092004

SEP

06:04 AM

2060
Views
1
Ans

Give the structure of the function ?


o

PL/SQL Interview Questions

FUNCTION name (argument list .....) Return datatype is local variable declarations
Begin
executable statements Exception
execution handlers End;
bavani

o
Oct 23rd, 2006
create or replace function function_name(formal parameters list with only IN mode) return
datatypeislocal variable declarationsbegin executable statments; return value ;end function_name;
Answer Question

FEB

Select Best Answer

092006

10:10 AM

1754
Views
4
Ans

What is the difference between a reference cursor and normal


cursor ?
o

Shweta_faqs

PL/SQL Interview Questions

syed_ansar

o
Oct 18th, 2006
We can use Ref cursor as an IN OUT parameter .
Nantha

o
Apr 18th, 2006
Normal cursor is used to process more than one record in plsql.Refcusor is a type which is going to
hold set of records which can be sent out through the procedure or function out variables.
Answer Question

JUN

Select Best Answer

272006

05:43 AM

1474
Views
3
Ans

How to view the contents of tables created by the following


procedure after the Loop?CREATE OR REPLACE PROCEDURE
A0_BULK_COLLECT_TEST IS TYPE EMPLOYEE_MRNO IS
TABLE OF A_REGISTRATION_HEADER.ARH_MR_NUM%TYPE;
TYPE EMPLOYEE_NAME IS TABLE OF VARCHAR2(255);
MRNUMBERS EMPLOYEE_MRNO; NAMES EMPLOYEE_NAME;
CURSOR crBulkCollect IS SELECT ARH_MR_NUM,
ARH_FIRST_NAME||' '||ARH_MIDDLE_NAME||' '||
ARH_LAST_NAME FROM A_REGISTRATION_HEADER WHERE
ARH_CTGRY_CD='EMP';BEGIN OPEN crBulkCollect; FETCH
crBulkCollect BULK COLLECT INTO MRNUMBERS, NAMES;
CLOSE crBulkCollect;END;
o

kameshakundy

PL/SQL Interview Questions

kamala kanta Parhi

o
Oct 14th, 2006
select text from user_sourcewhere name='procedure_name';
D. Madhu

o
Jun 29th, 2006
select * from user_objects where type='procedure' and name='function or procedure name'
Answer Question

Select Best Answer

022006

SEP

02:06 AM

1372
Views
2
Ans

What is datatype of x when we say define x in oracle


o

akash638

PL/SQL Interview Questions

rashid

o
Sep 20th, 2006
define is use for predefine variable its depends on user. You can use char or number
Sachin

o
CHAR

Sep 5th, 2006

Answer Question

APR

Select Best Answer

152006

08:21 AM

1111
Views
2
Ans

How can I combine sequence with select statement which is used


in another insert statement. i.e.Insert into table1select
seq_id.currval,field1,..,fieldnfrom table2;How can I make the
above sentence possible?
o

deshaniprashant

PL/SQL Interview Questions

developer

o
Sep 14th, 2006
Hi,for example u have a sequence called s1 and table as student theninsert into student
values(s1.nextval,field1,field2, ....);that's all
Divesh

o
Apr 23rd, 2006
U can directly use insert into < table_name> select .currval/nextval from dual.Please free to contact
me if any queries on dibansal@cisco.com
Answer Question

AUG

Select Best Answer

082006

01:01 AM

6747
Views
9
Ans

How we can create a table in PL/SQL block. insert records into


it??? is it possible by some procedure or function?? please give
example...

dineshchaini

Dinesh

PL/SQL Interview Questions

o
Sep 9th, 2006
Dear Maria... I traied with the DBA previlage but... again the same prob.. proc created but table is
not thea... ok I tried u r proc and mail back to you...
tdas2004

o
Sep 7th, 2006
You are right Maria Antony, but the question is, why is it not possible to create the table thru the
procedure while you can create the sametable using create table SQL command.The answer is, to
creat...
Answer Question

AUG

Select Best Answer

202006

04:21 AM

961
Views
2
Ans

What would be the o/p for this ....declarecursor c1 is select * from


employees;emp_rec c1%rowtype;beginopen c1;delete from
employees;loopfetch c1 into emp_rec;exit when
c1%notfound;end loop;close c1;end;tell me what is active set ?
why you need cursors?and what is going to happen when you
use for update clause in cursor declarationwhy use nowait
clause what is its use
o

basukolur014

PL/SQL Interview Questions

Sheetal

o
Aug 24th, 2006
Hi,Your program will delete all rows from the table. If you print output after fetch from the cursor it
will show all rows those where selected in the cursors.When the cursor was created u select...

Rama Krishna,Y

o
Aug 21st, 2006
Hi Friend!! If you want to use the entire tale data from table in PL/SQL programing block,you have
to store the entire data in a temp buffer variable .. to syntronize that operation Oracle supports ...
Answer Question

JUL

Select Best Answer

172006

11:21 AM

1889
Views
3
Ans

How to display the contents of a current record fetched in a ref


cursor
o

jay

PL/SQL Interview Questions

gouthami kodangal

o
Aug 13th, 2006
by making use of sql%rowfound.
Shiv Mangal Rahi

o
Jul 25th, 2006
Hi,You could do the same as given under below for emp table.....CREATE OR REPLACE procedure
procasbegindeclarev_empno emp.empno%type;v_ename emp.ename%type;cursor c_emp isselect
empno,ename from emp;b...
Answer Question

JUN

02:03 AM

Select Best Answer

302006

3100
Views
5
Ans

How to handle exception in Bulk collector?


o

Samuel

PL/SQL Interview Questions

mariashylaja

o
Aug 12th, 2006
During bulk collect you can save the exception and then you can process the exception.Look at the
below given example:DECLARE TYPE NumList IS TABLE OF NUMBER; num_tab NumList :=
NumList(10,0,11,1...
mariashylaja

o
Aug 12th, 2006
DECLARE TYPE NumList IS TABLE OF NUMBER; num_tab NumList :=
NumList(10,0,11,12,30,0,20,199,2,0,9,1); errors NUMBER;BEGIN FORALL i IN
num_tab.FIRST..num_tab.LAST SAVE EXCEPTIONS DELETE *...
Answer Question

APR

Select Best Answer

242006

07:50 AM

1457
Views
4
Ans

What is the DATATYPE of PRIMARY KEY?is it Binary integer..i'm


not sure..1.Varchar22.Char3.Binary integer4.Number
o

Nitina

PL/SQL Interview Questions

Rama Krishna

o
Aug 11th, 2006
Its Binary IntegerRamki,TCS,HYD9989018508
parleg

o
Jul 16th, 2006
Is it number or binary integer?
Answer Question

AUG

Select Best Answer

012006

06:13 AM

898
Views
1
Ans

Plz Give which cursor is better for better performance means


type of cursors.
o

chandu

PL/SQL Interview Questions

Yerra Rama Krishna,TCS

o
Aug 9th, 2006
Hi Friend!
If you deal with better performance You have to refer REF CURSOR and its
more advantage and effecient of Exeqution.Thanks&RegdsRamki
Answer Question

Select Best Answer

292006

MAY

03:05 AM

1221
Views
1
Ans

What are pipelined functions . illustrate by example


o

navneet

PL/SQL Interview Questions

Gupta

o
Aug 7th, 2006
A table function is a function that returns an entire set of rows, and can be queried directly from the
within a SQL statement, as if it were true database table. Whereas pipeline function is similar,...
Answer Question

JUL

Select Best Answer

292006

07:47 AM

2321
Views
2
Ans

In a Distributed Database System Can we execute two queries


simultaneously ? Justify ?

sushanta K. Mishra

PL/SQL Interview Questions

D. Madhusudhana Rao ( 9885626575)

o
Aug 1st, 2006
Its depend upon the query. If the two queries are firing on the table it is not possible. If the queries
are firing on different different tables then it is possible.Thanks & RegardsMadhu D.
Manoj Kumar Verma

o
Aug 1st, 2006
As Distributed database system based on 2 phase commit,one query is independent of 2 nd query so
of course we can run.manoj
Answer Question

JUL

Select Best Answer

072006

07:29 PM

5694
Views
1
Ans

#1 What are the advantages and disadvantages of using PL/SQL


or JAVA as the primary programming tool for database
automation.#2 Will JAVA replace PL/SQL?
o

ana thomas

PL/SQL Interview Questions

Lingaraj RH

o
Jul 12th, 2006
Internally the Oracle database supports two procedural languages, namely PL/SQL and Java. This
leads to questions like "Which of the two is the best?" and "Will Oracle ever desupport PL/SQL in
favour ...
Answer Question

Select Best Answer

JUN

192006

09:44 AM

1731
Views
1
Ans

for example
source date is 19980224
it should be in target
1998-02-24.23.59.59.999999">

I want to convert source Date format "CCYYMMD" to "CCYY-MMDD23.59.59.999999" in to the target for example source date is
19980224it should be in target 1998-02-24.23.59.59.999999
o

Sachin

PL/SQL Interview Questions

praveen

o
Jul 3rd, 2006
Hi all,let first conver it into to_date and thenm to_char and then concate with .23.59.59.999999this
way to_char(to_date('column name','ccyymmd') ,'ccyy-mm-dd')||.28.59.59.9999999try for
thisregardspraveen
Answer Question

Select Best Answer

152006

MAY

02:36 AM

912
Views

1
Ans

How to come back in normal stage in Mutating Table if mutating


table is locked or update data?
o

ranjan

PL/SQL Interview Questions

Murali Krishna

o
Jun 4th, 2006
hi ,U can use the PRAGMA Function.I.e Autonomous Function to come back to normal stage in
Mutating table.
Answer Question

MAR

Select Best Answer

072006

12:07 PM

1190
Views
1
Ans

How do you get the return values in pl/sql when u exec them be
sides assigning the values to Bind variables
o

srini

PL/SQL Interview Questions

MANI

o
May 31st, 2006
send an inout parameter to pl/sql procedure
Answer Question

Select Best Answer

MAR

092006

08:19 AM

2183
Views
2
Ans

How can we find the status (enabled/disable) of the trigger and


the user who changed the status in SQL-Server.Many thanks.
o

Shahid

PL/SQL Interview Questions

krishna631

o
May 31st, 2006
Hai,To know weather the Trigger status is Active/Inactive,Refer to "all_objects" TableSelect * from
all_objects where object_type = 'TRIGGER' and Object_name='XXX'Krishna Mohan
mahi

o
Mar 16th, 2006
Hi,U can see the information in 'user_triggers' by giving the statement likeselect * from user_triggers
where trigger_name='xxx';Thanks
Answer Question

APR

Select Best Answer

162006

08:04 AM

1206
Views
1
Ans

Can we relate two different tables from two different users in


ORACLE,PL/SQL?
o

Shankar

PL/SQL Interview Questions

manoj bajaj

o
Apr 25th, 2006
Yes we can relate two tables from 2 diff usersE.g. if user A has table Ta and User B has Table Tb
and Table Tb is child table and needs foreign key on A.Ta then we need to grant "references" object
privillege to User B on table Ta.1
Answer Question

MAR

Select Best Answer

282006

02:03 AM

1300
Views
1
Ans

If records are inserted into table without committing.How to refer


to these values in a procedure?
o

PL/SQL Interview Questions

SADANAND

o
Apr 14th, 2006
First create a Trigger and with Procedure you insert records.The :new will take the new values. So
use Triggers in Procedures

Sort by:

Answers
|
Date
Jump to Page:
26

052005

SEP

07:13 PM

1882
Views
2
Ans

What is Data Concarency and Consistency?


o
o

PL/SQL Interview Questions

Data Concarency => Means that many users can access data at the same time.Data
Consistency => Means that each user sees a consistent view of the data, including visible
changes made by the user's own transactions and transactions of other users.
arvind kumar

o
Apr 12th, 2006
types of triggers
tm1966_muthu

o
Feb 17th, 2006
ConcurrencyHow well can multiple sessions access the same data simultaneously ConsistencyHow
consistent is the view of the data between and within multiple sessions, transactions or statements
Answer Question

FEB

11:00 AM

Select Best Answer

122006

1583
Views
1
Ans

In packages the source code is compiled into p code ? how do


we describe the p code
o

richa

PL/SQL Interview Questions

praveen.pinisetti

o
Apr 6th, 2006
After compiling procedures,functions and triggers(in new versions only),Those will be stored in the
form of p-code(after parsing) in SGA(System Global Area).The advantage of p-code is Since it wa...
Answer Question

MAR

Select Best Answer

182006

02:16 PM

1332
Views
1
Ans

In which system table i can found that how many cursors are
currently open in the database?
o

Amitava

PL/SQL Interview Questions

Guna Sagar Challa

o
Mar 27th, 2006
Hi,Use the V$OPEN_CURSOR view to know how many cursors are currently open in the
database.Guna Sagar Challa
Answer Question

Select Best Answer

292005

SEP

02:38 AM

1319
Views
2
Ans

Watis define rights invoke rights


o

pradeep_davis

PL/SQL Interview Questions

Antony Gubert

o
Mar 6th, 2006
Definer Rights--------------A routine stored in the database by default, is executed with the definer
rights (owner of the routine), depending on the user who calls it. For example, table "...
Tez

o
Oct 9th, 2005
U can unerstand these if u hav an idea of DBA..... DBA is the one who has all the priveleges on the
database.....So if u are a user of the database........ and if u want to make some operations on t...
Answer Question

MAR

04:50 AM

Select Best Answer

022006

2347
Views
2
Ans

What is crosstab
o

sashikanth

PL/SQL Interview Questions

Sourabh

o
Mar 4th, 2006
create table src_table(col1 varchar2(10),col2 varchar2(10),col3 varchar2(10),col4 varchar2(10),col5
varchar2(10));insert into src_table values ('A', 'B', 'C', null, null);insert into src_table values ...
KS

o
Mar 3rd, 2006
To create a result set where the rows need to be columns, or vice versa. You need to "pivot" rows into
columns, or vice versa. this is where you need to look at a pivot (or crosstab) query.
Answer Question

MAR

Select Best Answer

022006

09:14 AM

1600
Views
1
Ans

How to query to know, that dbms_rowid package contains


ROWID_OBJECT, rowid_block_number ,etc procedures or
functions in it.

archana.nukala

PL/SQL Interview Questions

Rajesh Ramanan

o
Mar 2nd, 2006
SELECT dbms_rowid.rowid_block_number(rowid)FROM bowie_stuff;SELECT
dbms_rowid.rowid_object(rowid)FROM bowie_stuff;
Answer Question

FEB

Select Best Answer

162006

10:34 AM

1410
Views
1
Ans

Hi, in Cursors this is the Scenario.if i am manipulating the data of


a table which has 10 records,i need to go to the 5th record.how is
it possible?What is the Exact usage of Ref Cursor?
o

murthy

PL/SQL Interview Questions

Navin

o
Mar 2nd, 2006
A ref cursor is a type that you can define in the declare section of your PL/SQL program. You can
then open this cursor for any SQL statement that you construct dynamically in your program.For
your ot...
Answer Question

FEB

Select Best Answer

092006

07:26 AM

1918
Views
1
Ans

Describe in brief some of the featurs of oracle9i.What is


LogMiner?
o

Soma Bose

PL/SQL Interview Questions

tm1966_muthu

o
Feb 17th, 2006
LogMiner is a powerful audit tool for Oracle databases, allowing administrators to easily locate
changes in the database, enabling sophisticated data analyses, and providing undo capabilities to
rollback logical data corruptions or user errors.
Answer Question

FEB

Select Best Answer

142006

12:44 AM

1074
Views
1
Ans

Hi,i want to know that,Will the functionality of these two


statements:EXEC SQL SET TRANSACTION READ ONLY ENDEXECEXEC SQL SET TRANSACTION READ WRITE END-EXECare

same as EXEC SQL SET TRANSACTION REPEATABLE READ


END-EXECGive me the replacement for the above 2 sql
statements.thanks in advance,rashmi
o

rashmi

PL/SQL Interview Questions

ramkiibm.yerra

o
Aug 29th, 2007
Hai Rashmi Its not Similar. The First statement is only for Read-Only Trasactions that to be used in
PL/SQL Block. The Second one is for Isolation Levels like Read Uncommitted, Read Committed,
Repeatable Read, Serializable.RegdsRama Krisha.Yramakrishna . yerra @ in . ibm . com
Answer Question

JAN

Select Best Answer

312006

10:12 AM

2813
Views
1
Ans

What happens when a package is initialized ?


o

Shweta_faqs

PL/SQL Interview Questions

SANCHITA SARKAR

o
Feb 2nd, 2006
When a package is initialised that is called for the first time the entire package is loaded into SGA
and any variable declared in the package is initialises.
Answer Question

NOV

Select Best Answer

072005

03:06 AM

1870
Views
1
Ans

How can you write a cursor without select statement ?


o

rajeevsingh

PL/SQL Interview Questions

pankaj_gauba

o
Jan 11th, 2006
In reference cursor but we have option of giving the where clause in the body ,We cann't write cursor
without select statement.
Answer Question

Select Best Answer

Showing Questions 501 - 511 of 511 Questions


First | Prev | Next | Last Page

You might also like