You are on page 1of 3

12/29/2014

Oracle PL/SQL interview questions

Oracle PL/SQL interview questions

Oracle PLSQL interview questions and answers for freshers and experienced candidates. Also find Oracle PLSQL online practice tests to fight written tests and certification exams on Oracle PLSQL. In this section we have covered almost all Oracle PLSQL questions that might be asked during an interview.

Interview Q&A Videos Placement papers
Interview Q&A
Videos
Placement papers
12/29/2014 Oracle PL/SQL interview questions Oracle PL/SQL interview questions Oracle PLSQL interview questions and answers forAsk a question Search HR interview CV Cover letter GD Aptitude Current Affairs Exam English Career Q & A Online test Jobs Oracle PL/SQL PL/SQL interview questions and answers - posted on April 22, 2013 at 02:10 PM Define PL/SQL. -PL/SQL is a procedural language and is an extension to standard SQL. -It enables us to execute procedural logic on the database. -We use PL/SQL to perform processing on the server. -We can also use PL/SQL to create stored procedure and functions. Advantages of PL/SQL -PL/SQL is a development tool and is an extension to standard SQL. -We can use conditional checking, branching and looping in PL/SQL. -In PL/SQL, we can send a block of statement to the server which reduces network traffic. -PL/SQL provides rich set of error handling mechanism. -PL/SQL supports portability i.e. code written in DOS version can run on unix version. Explain the concept of exception. An exception occurs when unwanted situation arises. The situation can be exceptional to normal functioning of the program. It can occur due to system error, user error and application error. In PL/SQL, we can anticipate and trap these errors by means of exception handling code. Types of Exceptions: Predefined oracle exceptions User-defined exceptions Defined user defined exceptions. We use user defined exception only when oracle doesn't raise its own exception. In this procedure we raise an exception by using RAISE command. What is a cursor? Define explicit and implicit cursor. The oracle engine opens a work area for each SQL's operations for its internal processing in order to execute SQL statements. This area is private to SQL's operations and is called as a cursor. Implicit cursor - If the oracle engine has opened a cursor for its internal processing, then it is implicit cursor. Explicit cursor - It is also known as user defined cursor. When a user opens a cursor for processing data, the cursor is explicit cursor. Explain about the cursor attributes. Each cursor or cursor variable has four attributes: %FOUND, %ISOPEN, %NOTFOUND and %ROWCOUNT When appended to the cursor, these attributes return useful information about the execution of a data manipulation statement. What are the restrictions of using cursor variables? -PL/SQL tables cannot store cursor variables. -Remote subprogram cannot return the value of a cursor variable. What is a trigger in PLSQL? A trigger is a PLSQL block that is executed whenever an event occurs. It fires implicitly whenever the triggering event happens, a trigger nt n r t r m nt A tri r nn t b d f r SELECT t t m Interview questions Oracle interview Oracle architecture Oracle FAQs Download Oracle/Java FAQ Test Oracle skills New More Oracle FAQs Oracle processes Oracle memory area Oracle file types Oracle database objects Oracle operators Oracle composite Oracle constraints Oracle data types Oracle DCL and TCL Oracle DML commands Oracle error handling Oracle functions Oracle procedure, package Oracle import and export Oracle sub queries Oracle table Oracle triggers Oracle views Oracle synonym Oracle indexes Oracle joins Oracle cursors Oracle form Oracle security Oracle system privilege Oracle object privileges Oracle table privileges Oracle view privileges Oracle backup & recovery Oracle DBA Oracle PL/SQL Oracle nested table & varrays Oracle large objects Oracle replication Oracle transaction Oracle optimizer Oracle auditing http://www.careerride.com/Oracle-PLSQL.aspx 1/ 3 " id="pdf-obj-0-17" src="pdf-obj-0-17.jpg">
Search
Search

HR interview

CV

Cover letter

GD

Aptitude

Current Affairs

Exam

English

Career Q & A

Online test

Jobs

Oracle PL/SQL

PL/SQL interview questions and answers - posted on April 22, 2013 at 02:10 PM

Define PL/SQL.

-PL/SQL is a procedural language and is an extension to standard SQL. -It enables us to execute procedural logic on the database. -We use PL/SQL to perform processing on the server. -We can also use PL/SQL to create stored procedure and functions.

Advantages of PL/SQL

-PL/SQL is a development tool and is an extension to standard SQL. -We can use conditional checking, branching and looping in PL/SQL. -In PL/SQL, we can send a block of statement to the server which reduces network traffic. -PL/SQL provides rich set of error handling mechanism. -PL/SQL supports portability i.e. code written in DOS version can run on unix version.

Explain the concept of exception.

12/29/2014 Oracle PL/SQL interview questions Oracle PL/SQL interview questions Oracle PLSQL interview questions and answers forAsk a question Search HR interview CV Cover letter GD Aptitude Current Affairs Exam English Career Q & A Online test Jobs Oracle PL/SQL PL/SQL interview questions and answers - posted on April 22, 2013 at 02:10 PM Define PL/SQL. -PL/SQL is a procedural language and is an extension to standard SQL. -It enables us to execute procedural logic on the database. -We use PL/SQL to perform processing on the server. -We can also use PL/SQL to create stored procedure and functions. Advantages of PL/SQL -PL/SQL is a development tool and is an extension to standard SQL. -We can use conditional checking, branching and looping in PL/SQL. -In PL/SQL, we can send a block of statement to the server which reduces network traffic. -PL/SQL provides rich set of error handling mechanism. -PL/SQL supports portability i.e. code written in DOS version can run on unix version. Explain the concept of exception. An exception occurs when unwanted situation arises. The situation can be exceptional to normal functioning of the program. It can occur due to system error, user error and application error. In PL/SQL, we can anticipate and trap these errors by means of exception handling code. Types of Exceptions: Predefined oracle exceptions User-defined exceptions Defined user defined exceptions. We use user defined exception only when oracle doesn't raise its own exception. In this procedure we raise an exception by using RAISE command. What is a cursor? Define explicit and implicit cursor. The oracle engine opens a work area for each SQL's operations for its internal processing in order to execute SQL statements. This area is private to SQL's operations and is called as a cursor. Implicit cursor - If the oracle engine has opened a cursor for its internal processing, then it is implicit cursor. Explicit cursor - It is also known as user defined cursor. When a user opens a cursor for processing data, the cursor is explicit cursor. Explain about the cursor attributes. Each cursor or cursor variable has four attributes: %FOUND, %ISOPEN, %NOTFOUND and %ROWCOUNT When appended to the cursor, these attributes return useful information about the execution of a data manipulation statement. What are the restrictions of using cursor variables? -PL/SQL tables cannot store cursor variables. -Remote subprogram cannot return the value of a cursor variable. What is a trigger in PLSQL? A trigger is a PLSQL block that is executed whenever an event occurs. It fires implicitly whenever the triggering event happens, a trigger nt n r t r m nt A tri r nn t b d f r SELECT t t m Interview questions Oracle interview Oracle architecture Oracle FAQs Download Oracle/Java FAQ Test Oracle skills New More Oracle FAQs Oracle processes Oracle memory area Oracle file types Oracle database objects Oracle operators Oracle composite Oracle constraints Oracle data types Oracle DCL and TCL Oracle DML commands Oracle error handling Oracle functions Oracle procedure, package Oracle import and export Oracle sub queries Oracle table Oracle triggers Oracle views Oracle synonym Oracle indexes Oracle joins Oracle cursors Oracle form Oracle security Oracle system privilege Oracle object privileges Oracle table privileges Oracle view privileges Oracle backup & recovery Oracle DBA Oracle PL/SQL Oracle nested table & varrays Oracle large objects Oracle replication Oracle transaction Oracle optimizer Oracle auditing http://www.careerride.com/Oracle-PLSQL.aspx 1/ 3 " id="pdf-obj-0-59" src="pdf-obj-0-59.jpg">

An exception occurs when unwanted situation arises. The situation can be exceptional to normal functioning of the program. It can occur due to system error, user error and application error. In PL/SQL, we can anticipate and trap these errors by means of exception handling code.

Types of Exceptions:

Predefined oracle exceptions User-defined exceptions

Defined user defined exceptions.

We use user defined exception only when oracle doesn't raise its own exception. In this procedure we raise an exception by using RAISE command.

What is a cursor? Define explicit and implicit cursor.

The oracle engine opens a work area for each SQL's operations for its internal processing in order to execute SQL statements. This area is private to SQL's operations and is called as a cursor.

Implicit cursor - If the oracle engine has opened a cursor for its internal processing, then it is implicit cursor.

Explicit cursor - It is also known as user defined cursor. When a user opens a cursor for processing data, the cursor is explicit cursor.

Explain about the cursor attributes.

Each cursor or cursor variable has four attributes:

%FOUND, %ISOPEN, %NOTFOUND and %ROWCOUNT

When appended to the cursor, these attributes return useful information about the execution of a data manipulation statement.

What are the restrictions of using cursor variables?

-PL/SQL tables cannot store cursor variables. -Remote subprogram cannot return the value of a cursor variable.

What is a trigger in PLSQL?

A trigger is a PLSQL block that is executed whenever an event occurs. It fires implicitly whenever the triggering event happens, a trigger nt

n

r

t

r

m

nt

A tri

r

nn

t b

d f

r

SELECT

t

t

m

12/29/2014 Oracle PL/SQL interview questions Oracle PL/SQL interview questions Oracle PLSQL interview questions and answers forAsk a question Search HR interview CV Cover letter GD Aptitude Current Affairs Exam English Career Q & A Online test Jobs Oracle PL/SQL PL/SQL interview questions and answers - posted on April 22, 2013 at 02:10 PM Define PL/SQL. -PL/SQL is a procedural language and is an extension to standard SQL. -It enables us to execute procedural logic on the database. -We use PL/SQL to perform processing on the server. -We can also use PL/SQL to create stored procedure and functions. Advantages of PL/SQL -PL/SQL is a development tool and is an extension to standard SQL. -We can use conditional checking, branching and looping in PL/SQL. -In PL/SQL, we can send a block of statement to the server which reduces network traffic. -PL/SQL provides rich set of error handling mechanism. -PL/SQL supports portability i.e. code written in DOS version can run on unix version. Explain the concept of exception. An exception occurs when unwanted situation arises. The situation can be exceptional to normal functioning of the program. It can occur due to system error, user error and application error. In PL/SQL, we can anticipate and trap these errors by means of exception handling code. Types of Exceptions: Predefined oracle exceptions User-defined exceptions Defined user defined exceptions. We use user defined exception only when oracle doesn't raise its own exception. In this procedure we raise an exception by using RAISE command. What is a cursor? Define explicit and implicit cursor. The oracle engine opens a work area for each SQL's operations for its internal processing in order to execute SQL statements. This area is private to SQL's operations and is called as a cursor. Implicit cursor - If the oracle engine has opened a cursor for its internal processing, then it is implicit cursor. Explicit cursor - It is also known as user defined cursor. When a user opens a cursor for processing data, the cursor is explicit cursor. Explain about the cursor attributes. Each cursor or cursor variable has four attributes: %FOUND, %ISOPEN, %NOTFOUND and %ROWCOUNT When appended to the cursor, these attributes return useful information about the execution of a data manipulation statement. What are the restrictions of using cursor variables? -PL/SQL tables cannot store cursor variables. -Remote subprogram cannot return the value of a cursor variable. What is a trigger in PLSQL? A trigger is a PLSQL block that is executed whenever an event occurs. It fires implicitly whenever the triggering event happens, a trigger nt n r t r m nt A tri r nn t b d f r SELECT t t m Interview questions Oracle interview Oracle architecture Oracle FAQs Download Oracle/Java FAQ Test Oracle skills New More Oracle FAQs Oracle processes Oracle memory area Oracle file types Oracle database objects Oracle operators Oracle composite Oracle constraints Oracle data types Oracle DCL and TCL Oracle DML commands Oracle error handling Oracle functions Oracle procedure, package Oracle import and export Oracle sub queries Oracle table Oracle triggers Oracle views Oracle synonym Oracle indexes Oracle joins Oracle cursors Oracle form Oracle security Oracle system privilege Oracle object privileges Oracle table privileges Oracle view privileges Oracle backup & recovery Oracle DBA Oracle PL/SQL Oracle nested table & varrays Oracle large objects Oracle replication Oracle transaction Oracle optimizer Oracle auditing http://www.careerride.com/Oracle-PLSQL.aspx 1/ 3 " id="pdf-obj-0-127" src="pdf-obj-0-127.jpg">

Interview questions

12/29/2014 Oracle PL/SQL interview questions Oracle PL/SQL interview questions Oracle PLSQL interview questions and answers forAsk a question Search HR interview CV Cover letter GD Aptitude Current Affairs Exam English Career Q & A Online test Jobs Oracle PL/SQL PL/SQL interview questions and answers - posted on April 22, 2013 at 02:10 PM Define PL/SQL. -PL/SQL is a procedural language and is an extension to standard SQL. -It enables us to execute procedural logic on the database. -We use PL/SQL to perform processing on the server. -We can also use PL/SQL to create stored procedure and functions. Advantages of PL/SQL -PL/SQL is a development tool and is an extension to standard SQL. -We can use conditional checking, branching and looping in PL/SQL. -In PL/SQL, we can send a block of statement to the server which reduces network traffic. -PL/SQL provides rich set of error handling mechanism. -PL/SQL supports portability i.e. code written in DOS version can run on unix version. Explain the concept of exception. An exception occurs when unwanted situation arises. The situation can be exceptional to normal functioning of the program. It can occur due to system error, user error and application error. In PL/SQL, we can anticipate and trap these errors by means of exception handling code. Types of Exceptions: Predefined oracle exceptions User-defined exceptions Defined user defined exceptions. We use user defined exception only when oracle doesn't raise its own exception. In this procedure we raise an exception by using RAISE command. What is a cursor? Define explicit and implicit cursor. The oracle engine opens a work area for each SQL's operations for its internal processing in order to execute SQL statements. This area is private to SQL's operations and is called as a cursor. Implicit cursor - If the oracle engine has opened a cursor for its internal processing, then it is implicit cursor. Explicit cursor - It is also known as user defined cursor. When a user opens a cursor for processing data, the cursor is explicit cursor. Explain about the cursor attributes. Each cursor or cursor variable has four attributes: %FOUND, %ISOPEN, %NOTFOUND and %ROWCOUNT When appended to the cursor, these attributes return useful information about the execution of a data manipulation statement. What are the restrictions of using cursor variables? -PL/SQL tables cannot store cursor variables. -Remote subprogram cannot return the value of a cursor variable. What is a trigger in PLSQL? A trigger is a PLSQL block that is executed whenever an event occurs. It fires implicitly whenever the triggering event happens, a trigger nt n r t r m nt A tri r nn t b d f r SELECT t t m Interview questions Oracle interview Oracle architecture Oracle FAQs Download Oracle/Java FAQ Test Oracle skills New More Oracle FAQs Oracle processes Oracle memory area Oracle file types Oracle database objects Oracle operators Oracle composite Oracle constraints Oracle data types Oracle DCL and TCL Oracle DML commands Oracle error handling Oracle functions Oracle procedure, package Oracle import and export Oracle sub queries Oracle table Oracle triggers Oracle views Oracle synonym Oracle indexes Oracle joins Oracle cursors Oracle form Oracle security Oracle system privilege Oracle object privileges Oracle table privileges Oracle view privileges Oracle backup & recovery Oracle DBA Oracle PL/SQL Oracle nested table & varrays Oracle large objects Oracle replication Oracle transaction Oracle optimizer Oracle auditing http://www.careerride.com/Oracle-PLSQL.aspx 1/ 3 " id="pdf-obj-0-179" src="pdf-obj-0-179.jpg">

12/29/2014

Oracle PL/SQL interview questions

eve

accep s a gu

e

.

gge

ca

o

e use

o

a

s a e

e

.

What are the triggers supported in oracle?

 

-DML triggers -Instead of triggers -DDL triggers -Database event triggers

 

DML triggers

 

It is defined on a table and fires in response to an event like

-

When a row is inserted to a table

-

When a row is updated

-

When a row is deleted

Instead of trigger

This trigger is created on views. You can either use Insert or Update or Delete or all three actions.

What are triggering attributes?

Triggering attributes are used to catch event when you want to identify or to perform certain actions.

They are as follows:

Inserting

Updating

Deleting

What is the difference between a function and a procedure in oracle?

A function always returns a value back to the calling block.

What are packages?

12/29/2014 Oracle PL/SQL interview questions eve accep s a gu e . gge ca o eOracle backup Oracle database tuning Oracle application tuning Oracle procedures Oracle functions Oracle loops Oracle exceptions Oracle Select into clause Oracle string functions Oracle numeric functions Oracle date functions Oracle translate and decode Oracle correlated sub-queries Oracle union, intersect, minus Oracle clusters Oracle sequences Oracle tablespaces Oracle object datatypes Oracle Tutorial A package is an encapsulated collection of related schema objects. A package is compiled and then stored in the database's data dictionary as a schema objects. These objects can be procedure, functions, variables, constants, cursors and exceptions. Explain the difference between GRANT and REVOKE command. GRANT command is used to allow a user to perform certain activities on the database. The REVOKE command disallows the user from performing certain activities. Explain the difference between ROLLBACK and COMMIT commands. The COMMIT command is used to save the modifications done to the database values by the DML commands. ROLLBACK command is used to undo the changes made by the DML commands. This ensures the values that existed prior to the changes can be achieved. Define Row level trigger. Row level trigger is fired each time a row is affected by DML statements like Insert, Update and Delete. When no rows affected, the trigger is not executed at all. Define Statement level triggers. It is fired when statement affects rows in a table but the processing required is completely independent of the number of rows affected. Define Joins and its types. A join is a query that extracts corresponding rows from two or more tables, views or snapshots. Types: Equi-joins Non-equi joins Self joins Outer joins Placement practice test: Java | SAP | .NET | Oracle | Sql Server | QA | Aptitude | Networking | All Skills Equi-join - information from two or more tables are retrieved by using equality conditions. Self joins - Self join is a join that relates to itself. Outer joins - Outer join fetch the rows from two tables which matches the join condition and the rows which don't match the join condition. Explain the advantages of PL/SQL. PL/SQL is a transaction processing language that offers the following advantages: ................ Read answer Explain block structure of PL/SQL. http://www.careerride.com/Oracle-PLSQL.aspx 2/3 " id="pdf-obj-1-100" src="pdf-obj-1-100.jpg">
12/29/2014 Oracle PL/SQL interview questions eve accep s a gu e . gge ca o eOracle backup Oracle database tuning Oracle application tuning Oracle procedures Oracle functions Oracle loops Oracle exceptions Oracle Select into clause Oracle string functions Oracle numeric functions Oracle date functions Oracle translate and decode Oracle correlated sub-queries Oracle union, intersect, minus Oracle clusters Oracle sequences Oracle tablespaces Oracle object datatypes Oracle Tutorial A package is an encapsulated collection of related schema objects. A package is compiled and then stored in the database's data dictionary as a schema objects. These objects can be procedure, functions, variables, constants, cursors and exceptions. Explain the difference between GRANT and REVOKE command. GRANT command is used to allow a user to perform certain activities on the database. The REVOKE command disallows the user from performing certain activities. Explain the difference between ROLLBACK and COMMIT commands. The COMMIT command is used to save the modifications done to the database values by the DML commands. ROLLBACK command is used to undo the changes made by the DML commands. This ensures the values that existed prior to the changes can be achieved. Define Row level trigger. Row level trigger is fired each time a row is affected by DML statements like Insert, Update and Delete. When no rows affected, the trigger is not executed at all. Define Statement level triggers. It is fired when statement affects rows in a table but the processing required is completely independent of the number of rows affected. Define Joins and its types. A join is a query that extracts corresponding rows from two or more tables, views or snapshots. Types: Equi-joins Non-equi joins Self joins Outer joins Placement practice test: Java | SAP | .NET | Oracle | Sql Server | QA | Aptitude | Networking | All Skills Equi-join - information from two or more tables are retrieved by using equality conditions. Self joins - Self join is a join that relates to itself. Outer joins - Outer join fetch the rows from two tables which matches the join condition and the rows which don't match the join condition. Explain the advantages of PL/SQL. PL/SQL is a transaction processing language that offers the following advantages: ................ Read answer Explain block structure of PL/SQL. http://www.careerride.com/Oracle-PLSQL.aspx 2/3 " id="pdf-obj-1-122" src="pdf-obj-1-122.jpg">

A package is an encapsulated collection of related schema objects. A package is compiled and then stored in the database's data dictionary as a schema objects. These objects can be procedure, functions, variables, constants, cursors and exceptions.

Explain the difference between GRANT and REVOKE command.

GRANT command is used to allow a user to perform certain activities on the database. The REVOKE command disallows the user from performing certain activities.

Explain the difference between ROLLBACK and COMMIT commands.

The COMMIT command is used to save the modifications done to the database values by the DML commands.

ROLLBACK command is used to undo the changes made by the DML commands. This ensures the values that existed prior to the changes can be achieved.

Define Row level trigger.

Row level trigger is fired each time a row is affected by DML statements like Insert, Update and Delete. When no rows affected, the trigger is not executed at all.

Define Statement level triggers.

It is fired when statement affects rows in a table but the processing required is completely independent of the number of rows affected.

Define Joins and its types.

A join is a query that extracts corresponding rows from two or more tables, views or snapshots.

Equi-join - information from two or more tables are retrieved by using equality conditions.

Self joins - Self join is a join that relates to itself.

Outer joins - Outer join fetch the rows from two tables which matches the join condition and the rows which don't match the join condition.

PL/SQL is a transaction processing language that offers the following advantages: ................

12/29/2014

DECLARE

--------declarations

BEGIN

--------statements.................

Read answer

Write a PL/SQL program for a trigger.

PL/SQL program for tracking operation on a emp table...........

Read answer

Oracle PL/SQL interview questions

What are SQLCODE and SQLERRM and why are they important for PL/SQL developers?

When a SQL statement raises an exception, Oracle captures the error codes by using the SQLCODE and SQLERRM globally-defined variables...............

Read answer

Explain difference between SQL and PL/SQL.

Write a PL/SQL program for a function returning total tax collected from a particular place.

What are the types PL/SQL code blocks?

Anonymous Block, Stored Program Unit, Trigger...........

Advantages of PL/SQL

Support SQL data manipulation, provide facilities like conditional checking, branching and looping..............

<<Previous Next>>

The answers to following questions will be made available soon. Keep visiting.

Define PL/SQL. Explain each section of PL/SQL with an example, i.e. Declaration, Executable commands, Exception handling. Explain the condition logic with an example, i.e. if, else, elsif and case command. What is Goto statement? Explain its uses with an example.

Write your comment - Share Knowledge and Experience

kanimozhi m 04-30-2013 10:50 AM this is very useful for our future java,oracle Discussion Board

kanimozhi m 04-30-2013 10:50 AM

this is very useful for our future

java,oracle

Discussion Board

Home | Login | About us | Sitemap | Contact us Copyright © 2008 - 2014
Home | Login | About us | Sitemap | Contact us Copyright © 2008 - 2014
 

Home | Login | About us | Sitemap | Contact us

Copyright © 2008 - 2014 CareerRide.com. All rights reserved. Terms of use | Follow us on Facebook!

Bookmark to:

Home | Login | About us | Sitemap | Contact us Copyright © 2008 - 2014
Home | Login | About us | Sitemap | Contact us Copyright © 2008 - 2014
Home | Login | About us | Sitemap | Contact us Copyright © 2008 - 2014