PL/SQL Interview Question and Answers
1. |
What is dynamic SQL? |
|
- Dynamic SQL is used by PL/SQL to execute Data Definition Language (DDL) statements, Data Control (DCL) statements, or Transaction Control statements within PL/SQL blocks.
- These statements are not stored within the source code but are stored as character variables in the program.
- The SQL statements are created dynamically at runtime by using variables. This is used either using native dynamic SQL or through the DBMS_SQL package.
|
2. |
Does dynamic SQL support all SQL data types? |
|
Yes, dynamic SQL supports all SQL data types. It is possible to define variables and bind arguments of collection type, LOBS and REFs. |
3. |
What is the difference between BLOG and CLOG? |
|
The BLOG datatype is used to store a binary large object, such as a video image file; whereas, the CLOB datatype is used to store a character large object. |
4. |
Which Oracle package is used for scheduling jobs? |
|
The DBMS_JOB package is used for scheduling and executing PL/SQL programs. |