Series: Subject: Topic:

PL/SQL Interview Questions

Showing Questions 141 - 160 of 492 Questions
First | Prev | | Next | Last Page
Sort by: 

What is difference between "primary key" and "unique key"?

Asked By: Babar Shabbir | Asked On: Mar 18th, 2006

Answered by: sunshine60india on: Jun 18th, 2011

Primary KEY is the combination of UNIQUE and NOT NULL constraint

Answered by: neha.awasthi1 on: 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

What is the order of execution if there is a statement level and row level trigger on a same table?

Asked By: joseph | Asked On: Jan 30th, 2007

Answered by: Baji Shaik on: 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

Answered by: samareshp on: Apr 22nd, 2009

Order of triggre firing :::::::Before Statement levelBefore Row levelAfter Row levelAfter Statement level 

Hiwhile creating a table, what is the difference between varchar2(80) and varchar2(80 byte)?

Asked By: kkanmani | Asked On: Feb 7th, 2007

Answered by: Baji Shaik on: Jun 5th, 2011

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

Answered by: psingla on: 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...

What is diff between strong and weak ref cursors

Asked By: ddkdhar | Asked On: Feb 16th, 2007

Answered by: Baji Shaik on: Jun 5th, 2011

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

Answered by: askvenki on: Jul 20th, 2007

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

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...

Asked By: Oracle_learner | Asked On: Sep 24th, 2006

Answered by: sandeshshinde000 on: Jun 4th, 2011

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

Answered by: BakulPatel on: 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...

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...

Asked By: chiranjeevi reddy | Asked On: Feb 8th, 2006

Answered by: NehaChanda on: 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

Answered by: samareshp on: 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

PL/SQL utl_file package

Asked By: Subashpanda | Asked On: Feb 7th, 2011

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

Answered by: dinesh.smhdr on: May 19th, 2011


Talk about "exception handling" in PL/SQL?

Asked By: Beena | Asked On: Sep 19th, 2005

Answered by: krishnaindia2007 on: 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 ...

Answered by: g_sidhu on: 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...

Can procedures have parameters

Asked By: sreelatha | Asked On: Sep 27th, 2005

Answered by: krishnaindia2007 on: 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.

Answered by: kanchan Patra on: Aug 7th, 2007

Yes, Procedures can have parameters.

What is pragma execption_init ? Explain the usage ?

Asked By: Interview Candidate | Asked On: Sep 9th, 2004

 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)

Answered by: Devendra Tawar on: Apr 27th, 2011

Use for handle user defined exception.

Answered by: g_sidhu on: 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...

Oracle locks concept

Asked By: vrushali | Asked On: Jan 18th, 2011

Please explain how to set locktime out in Oracle.

Answered by: NareshAB on: Apr 24th, 2011

Set Lock_Timeout Time (in ms)Thanks

What is dense_rank function and it's usage ?

Asked By: ddkdhar | Asked On: Feb 16th, 2007

Answered by: Teju_hassan on: Apr 20th, 2011

See the below example to understand dense_rank,rank,salfrom empsorder by sal descdense_rank|rank|sal1              &...

Answered by: g_sidhu on: 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.

Can we call a procedure into another procedure?If yes means how you can pass the perameters for the two procedures?

Asked By: kumar71979 | Asked On: Mar 5th, 2006

Answered by: debasisdas on: 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...

Answered by: Arun on: 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...

Why and when would you use a package instead of standalone procedures? Which one increases performence - package or standalone procedure?

Asked By: gangadhar6708 | Asked On: Mar 8th, 2011

Answered by: mailtonagaraja on: 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...

Call fieldcontrols

Asked By: jalaramaiah_k | Asked On: Feb 17th, 2011

How can we call fieldcontrols in PL/SQL programming?

User defined exception handler

Asked By: Subashpanda | Asked On: Feb 7th, 2011

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)

Answered by: promisinganuj on: 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...

Pl SQL procedure in package

Asked By: kondla | Asked On: Jun 27th, 2008

Procedure in package perfomes fastly over normal procedure, explain.

Answered by: monoranjang on: 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 ...

Answered by: muraligrandhi on: 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 ...

Unconstrained loop

Asked By: vrushali | Asked On: Jan 18th, 2011

What is unconstrained loop?Suggest some example.

Answered by: Art11 on: Sep 27th, 2011

Did you mean infinite loop?

Answered by: vikz.pal on: 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...


Asked By: sdas84jobs | Asked On: Oct 6th, 2010

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?

Answered by: pravesh28 on: 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...

Answered by: muraligrandhi on: 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...

How packaged procedures and functions are called from the following?

Asked By: Interview Candidate | Asked On: Sep 9th, 2004

     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...

Answered by: shi_fu on: 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...

Answered by: g_sidhu on: Feb 16th, 2008

a. PACKAGE NAME.PROCEDURE NAME (parameters);     variable := PACKAGE NAME.FUNCTION NAME (arguments);        b.     ...

First | Prev | | Next | Last Page





twitter fb Linkedin GPlus RSS


Interview Question

 Ask Interview Question?


Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.