×

Top 25 PL/SQL Interview question for 2024

1) What is PL/SQL?

It is defined as SQL having Procedural features of Programming Language i.e. Procedural Language extension of SQL.

2) Enlist the section of PL/SQL block.

It consist of three block
  • Declaration Section
  • Execution Section
  • Exception Handling or Error Section

3) Give the advantage of PL/SQL.

  • Structured Block
  • Better Performance
  • Error Handling
  • Procedural Language Capability

4) Enlist the types of Data types in PL/SQL.

  • Scalar Data types: e.g. number, date, char, long, Boolean etc.
  • Composite Data types: e.g. Record, Table etc.

5) Write syntax to declare the variable?

Syntax:
DECLARE  
Var_name datatype [NOT NULL  := value]  
e.g. tut_example varchar2(10) NOT NULL  :="Best tutorial"
Syntax: to directly assign values to variable from database.
SELECT column_name  
INTO variable_name   
FROM table_name   
[WHERE condition];

6) Write some programming constructs supported by PL/SQL.

  • Variable and Constant
  • Flow Control
  • Cursor Management
  • Exception Handling
  • Triggers

7) Write single statement to concatenate Tutorials and Examples.

Website: = 'Tutorials' || 'Examples';

8) Give the precedence order among (AND, OR, NOT, NULL).

Highest order: NOT Lowest order: OR

9) What is Trigger in PL/SQL?

Trigger is initiated when query is fetched for any INSERT, UPDATE, DELETE etc where there is change in the structure of Database. It maintains the "Referral Integrity" of the PL/SQL.

10) Enlist the command that is use to create PL/SQL Packages.

  • CREATE PACKAGE command is used for creating the specification part.
  • BODY command is used for creating the body part.

11) What are the uses of Trigger?

  • Creating validation mechanisms
  • Creating logs to register the use of a table
  • Update other tables

12) Differentiate between Execution of Trigger and Stored Procedures ?

Trigger is executed automatically whereas Stored Procedures has to be invoked.

13) Which command is used to delete the package?

DELETE PACKAGE is used to delete the package.

14) Define CURSOR in PL/SQL.

It is a temporary area which is generated at the time of SQL statement execution in the system memory. It contains information about select statement and row data affected in database.

15) Enlist the types of cursor.

  • Implicit Cursor: It is created when DML statement is executed e.g. INSERT, UPDATE AND DELETE.
  • Explicit Cursor: It is created when we execute SELECT Statement which returns more then one rows.

16) Explain Raise_application_error.

It is a procedure of package DBMS_STANDARD that allows issuing of user_defined error messages from database trigger or stored sub-program.

17) When is a declare statement required?

DECLARE statement is used by PL SQL anonymous blocks such as with stand alone, non-stored procedures. If it is used, it must come first in a stand alone file.

18) What is the importance of SQLCODE and SQLERRM?

SQLCODE returns the value of the number of error for the last encountered error whereas SQLERRM returns the message for the last error.

19) What packages are available to PL SQL developers?

DBMS_ series of packages, such as, DBMS_PIPE, DBMS_DDL, DBMS_LOCK, DBMS_ALERT, DBMS_OUTPUT, DBMS_JOB, DBMS_UTILITY, DBMS_SQL, DBMS_TRANSACTION, UTL_FILE.

20) What is SQL*Loader?

SQL*Loader is a product for moving data in external files into tables in an Oracle database. To load data from external files into an Oracle database, two types of input must be provided to SQL*Loader : the data itself and the control file.

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

22) Define 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.

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

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

25) Explain how can you save or place your messages in a table?

To save msg in a table, you can do it in two ways:
  • Load individual messages with calls to the add_text procedure.
  • Load sets of messages from a database table with the load_from_dbms procedure.

Related Topics

Top 16 Yii PHP Framework Interview Questions for 2024

1) What is Yii Framework? Yii is an open source, web application framework based on MVC. It is written in PHP and used to design PHP applications. This application was started...

4 minutes read.

Top 20 HTTP Interview Questions for 2024

1) What is HTTP? HTTP stands for Hypertext Transfer Protocol. It is a set of rules for transferring of data on WWW (World Wide Web). 2) What are the basic Features of...

4 minutes read.

Top 30 Web Service Interview Questions for 2024

1) What is a Web Service? Web service is a client server application or component. It is used for communication. It is way to communicate between two devices over network. In another word...

5 minutes read.

Top 50 HTML Interview Questions for 2024

1) What is HTML? HTML stands for Hyper Text Markup Language. It is used for creating web pages and web applications. HTML documents are made up of two things: the content and the tags. 2) What are...

10 minutes read.

Top 15 RESTful Web Services Interview Question for 2024

1) What is REST? REST is web standards based architecture and stands for REpresentational State Transfer. It uses HTTP Protocol for data communication. Here, everything is a resource. 2) What are the HTTP methods used...

2 minutes read.

Django Interview Questions for 2024

Django is an open-source python web framework. It is very popular due to the functionalities it offers. It uses the Model-View-Template architecture. Many giant organizations are using Django as their...

10 minutes read.

Top 30 DBMS Interview Questions for 2024

1) What is DBMS? DBMS (Data Base Management System) is a technology for managing data of database i.e. Create, Update, Delete, Alter. 2) What is a Database System? It is defined as collection...

4 minutes read.

WebSockets Interview Questions

1) What is Web Sockets? Web Sockets is a two way communication between the clients and the servers. Here, the clients and servers both the parties can communicate and exchange data...

3 minutes read.

Top 16 Ionic Interview Questions for 2024

Top 20 Ionic Interview Questions and Answers for Freshers 1) What is Ionic framework? Ionic is open source HTML5 framework used for hybrid mobile application development. It provides tools and services for...

3 minutes read.

Top 15 SQL Server Interview Question for 2024

1) Describe SQL Server? SQL server is a DataBase Management System developed by Microsoft. It was first introduced in year 2008 since, then many version has been introduced such as :...

2 minutes read.

Top 15 VBA Interview Questions for 2024

1) What is VBA? VBA stands for Visual Basic Application. It is an event-driven programming language. It is mainly used with Microsoft Office applications such as MS -Excel, MS-Word and MS-Access. 2)...

3 minutes read.

Top 15 XML Interview Questions for 2024

1) What is XML? XML (eXtensible Markup Language) is designed to transport and store data. It has user executive tags i.e. no pre-defined tags used as in HTML. This language is...

2 minutes read.

Top 22 MariaDB Interview Question for 2024

1) What is MariaDB? It is a community based database devoloped by MySQL Devolopers. It provides same features as MySQL also, can be said that it is a replacement of MySQL. 2)...

3 minutes read.

Top 20 C Programming | Coding Interview Questions for 2024

Most Frequently asked C programming | Coding Interview Questions and answer for Fresher C is a powerful high-level programming language.  It is a fast, portable and available for all platforms. C...

15 minutes read.

Top 14 MathML Interview Questions for 2024

1) What is MathML? MathL stands for Mathematical Markup Language. It is extended form of XML. It is used to describe mathematical and scientific notations. 2) Who is the developer of MathML? World...

3 minutes read.

Top 31 Flask Interview Questions for 2024

1) What is Flask? Flask is a micro web framework written in Python. It is based on Werkzeug toolkit and Jinja 2 template engine. 2) Who is the developer of Flask? Armin Ronacher...

6 minutes read.

Top 15 JSP Interview Questions for 2024

1) What is JSP? It is a technology which is used to create web application like Servlet technology. It provides more functionality than Servlet. It consists of HTML and JSP tags. 2) What are...

3 minutes read.

Top 15 Erlang Interview Questions for 2024

1) What is Erlang÷ Erlang is an open source programming language. It is used to build massively scalable soft real-time systems. It has runtime environment. It supports concurrency, fault tolerance and...

2 minutes read.

Top 15 JavaFX Interview Questions for 2024

1) What is JavaFX? JavaFX is a software platform for creating desktop applications or internet application. It uses java library. It can run various devices such as Desktop Computer, Mobile, TVs...

3 minutes read.

Bugzilla interview Questions

Frequently asked questions about Bugzilla Q1. What are reports in Bugzilla? A1. Reports can be defined as an interface between the user and the database of Bugzilla. It helps to examine and...

4 minutes read.