PL/SQL Interview Questions


Prev Tutorial Next Tutorial

PL/SQL Interview Questions

What is pl/sql ?

PL/SQL stand for (Procedural Language / Structure Query Language). It is extension of SQL. It was developed by Oracle Corporation in the early 90's to increase the functionality of SQL.

Why use pl/sql ?

  • SQL does not support looping and condition statements etc...
  • In SQL you can not execute more than one statement at a time, so it increase the network traffic.
  • SQL always gives system defined error message, when user perform any wrong transaction.
  • SQL does not support the code reusability, it means you need to write insert, delete, update, select command each and every time.
  • SQL does not support procedure language features such as code reusability and modularity and some other features of oops.

To overcome all the above limitation of sql we use pl/sql.

How to declare variable in pl/sql ?

Variable declaration

Syntax

variable_name datatype;

Example

a number;

What is trigger ?

Trigger is a pl/sql block structure which is fired when a DML statements like Insert, Delete, Update is executed on a database table.

What is cursor ?

A cursor is a temporary work area created in the system memory when a SQL statement is executed.

What is difference between function and procedure ?

The main difference between a procedure and a function is, a function must always return a value, but a procedure may or may not return a value.


Prev Tutorial Next Tutorial

Advertisements





Facebook Likes

Advertisements