Home / Interview Questions / Database Interview Questions / PL/Sql Interview Questions Part 2

PL/Sql Interview Questions Part 2

1. What is PL/SQL?

  • PL/SQL stands for procedural language extension to SQL.
  • It supports procedural features of programming language and SQL both.
  • It was developed by Oracle Corporation in early of 90’s to enhance the capabilities of SQL.

2. What is the purpose of using PL/SQL?

  • PL/SQL is an extension of SQL.
  • While SQL is non-procedural, PL/SQL is a procedural language designed by Oracle.
  • It is invented to overcome the limitations of SQL.


3. What are the most important characteristics of PL/SQL?

A list of some notable characteristics:

  • PL/SQL is a block-structured language.
  • It is portable to all environments that support Oracle.
  • PL/SQL is integrated with the Oracle data dictionary.
  • Stored procedures help better sharing of application.

4. What is PL/SQL table? Why it is used?

  • Objects of type tables are called PL/SQL tables that are modeled as database table.
  • We can also say that PL/SQL tables are a way to providing arrays.
  • Arrays are like temporary tables in memory that are processed very quickly.
  • PL/SQL tables are used to move bulk data.
  • They simplifies moving collections of data.



5. What are the datatypes available in PL/SQL?

There are two types of datatypes in PL/SQL:

  1. Scalar datatypes Example are NUMBER, VARCHAR2, DATE, CHAR, LONG, BOOLEAN etc.
  2. Composite datatypes Example are RECORD, TABLE etc.

6. What is the basic structure of PL/SQL?

PL/SQL uses BLOCK structure as its basic structure.

Each PL/SQL program consists of SQL and PL/SQL statement which form a PL/SQL block.

PL/SQL block contains 3 sections.

  1. The Declaration Section (optional)
  2. The Execution Section (mandatory)
  3. The Exception handling Section (optional)

8. What is exception? What are the types of exceptions?

Exception is an error handling part of PL/SQL.

There are two type of exceptions: pre_defined exception and user_defined exception.

9. How to write a single statement that concatenates the words ?Hello? and ?World? and assign it in a variable named Greeting?

Greeting := ‘Hello’ || ‘World’;

10. Does PL/SQL support CREATE command?

No, PL/SQL doesn’t support the data definition commands like CREATE.

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

A function returns a value while a stored procedure doesn’t return a value.

12. How exception is different from error?

  • Whenever an Error occurs Exception arises.
  • Error is a bug whereas exception is a warning or error condition.


13. What is the main reason behind using an index?

By using an Index we can access data blocks Faster in the table.

14. What are PL/SQL exceptions? Tell me any three.

  1. Too_many_rows
  2. No_Data_Found
  3. Value_error
  4. Zero_error etc.

15. How do you declare a user-defined exception?

You can declare the User defined exceptions under the DECLARE section, with the keyword EXCEPTION.


<exception_name> EXCEPTION;



About Syed Saad Ali

As a certified and experienced Oracle Database Administrator with Almost 10 Years of Experience I am able to perform all levels of database maintenance and am fully qualified to do Oracle updates as well. Capitalizing on my interest in Business & IT both, I chose to navigate my career towards Enterprise Solutions, which has enabled me to excel in the combination of both. I have developed exceptional analytical skills that allow me to diagnose and take care of issues immediately. Extremely skilled in planning and execution of special projects in time- critical environments. Extensive knowledge in directing, coordinating and exercising concern authority for planning, organization, control and successful completions. Very skilled at solving customer relations issues by seeking first to understand and then to be understood. Effectively able to communicate with customers, vendors and management.

Check Also

Apps Technical Interview Questions Part 5

Leave a Reply