Before trying to get precise knowledge about the PL SQL Interview Questions And Answers it is important to have a basic understanding of PL SQL in Oracle and what it is all about. PL SQL is a Procedural Language extension of SQL and it is basically a good combination of SQL with certain procedural features contained in programming languages.
PL/SQL was developed by the Oracle Corporation in early 1990s for bringing about an enhancement in the capabilities possessed by SQL. The PL SQL engine is used by Oracle for processing PL SQL statements. It is very easy to store PL SQL code in database from server side and client system from the client side.
PL SQL Programming Tutorial
The PL SQL programming tutorial will offer you a basic idea of database programming along with important and useful examples. There are free online tutorials available for PL SQL that can guide you in practicing, learning, getting trained and referring while programming with the use of PL SQL.
The tutorials for PL SQL usually discuss programming concepts related to this language or those that are specific to PL SQL from Oracle. The basic concepts include functions, cursors and certain stored procedures that can easily be used in different database systems such as Microsoft SQL server and Sybase with certain modifications made in the SQL syntax
Define PL SQL
PL SQL is basically a procedural language which serves as an addition to standard SQL. It enables you in executing procedural logic on the database. PL SQL is used for performing the processing on the server. PL SQL can also be used for creating stored functions and procedures.
Benefits of PL SQL
PL SQL can be used in the form of a tool for development and in the form of an extension to SQL. Looping, branching and conditional checking can be used in PL SQL. In PL SQL, a statement block can easily be sent to the server and this helps in bringing about a reduction in network traffic. A rich and good set of mechanisms that can be used for error handling are provided in PL SQL. PL SQL is supportive to portability, meaning any code written in the version of DOS can easily run on the version of UNIX.
Explain the whole idea behind Exceptions
When an unwanted situation arises, it is only then that an exception comes into being. The situation might be exceptional to the normal functioning of any program. This can take place because of user error, system error and even application error.
What are the different kinds of exceptions?
The different kinds of PL SQL exceptions are;
- Predefined Oracle Exceptions
- User-defined Exceptions
When the oracle in no ways raises its very own exception, it is only then that a user defined exception is used. The RAISE command is basically used for raising this exception.
What is cursor and define implicit and explicit cursor?
The work area opened for every SQL operation for the purpose of internal processing and for the execution of SQL statements is called the cursor and this private area is opened by oracle engine.
The cursor opened by oracle engine for the purpose of internal processing in called an implicit cursor.
This is also called user defined cursor and it is opened by the oracle engine for the purpose of processing data.
Explain cursor attributes
Every cursor or cursor variable possesses a total of four attributes and they are %FOUND, %ISOPEN, %NOTFOUND and %ROWCOUNT.
These are some of the most basic questions and answers for the PL SQL interview that the developers intend to appear.
Thank you for reading the Part 1 of PL SQL Interview Questions and Answers. I will get back with Part 2 sooner.
Please visit https://www.sql-scripts.com for anything that is related SQL Queries, Scripts and How to stuffs.