Reviewing It |
1: | What does PL/SQL stand for? |
A1: | Procedural Language SQL |
2: | What exactly is a stored procedure? |
A2: | A stored procedure is a code module that does some processing and returns a code stating that the procedure was successful or not |
3: | What is the difference between a Named PL/SQL block and an Un-named PL/SQL block? |
A3: | Named PL/SQL blocks can be called in the form of procedures or functions, un-named PL/SQL are imbedded in applications |
4: | What are the three syntax basics of any PL/SQL block? |
A4: | Begin, Exceptions, End |
5: | The special datatype %TYPE is useful for what? |
A5: | %TYPE is useful to guarantee that the datatype and length of the variable matches that of a column in the database |
6: | PL/SQL uses the DBMS_OUTPUT.PRINT_LINE. What needs to be set in SQL*Plus to see this output? |
A6: | use of SQL*Plus environment setting SET SERVEROUTPUT ON is set when the PL/SQL feature DBMS_OUTPUT.PRINT_LINE is used |
7: | What are the three kinds of loops? |
A7: | Basic, For, and While |
8: | What are the two variables available to PL/SQL when Oracle errors occur? |
A8: | SQLCODE and SQLERRM. |
Checking It |
1: | Triggers, Functions, and Procedures can also be coded in JAVA. True/False |
A1: | True |
2: | Cursors are
|
A2: | b |
3: | Procedures differ from Functions in that:
|
A3: | c |
4: | The PL/SQL variable name must be unique to the PL/SQL block. True/False |
A4: | T |
5: | What is the difference between implicit cursors and explicit cursors?
|
A5: | d |
6: | An IF statement really doesn't need an ENDIF. True/False |
A6: | False |
7: | If an error condition is not handled by the PL/SQL block:
|
A7: | b. |
8: | The WHEN_OTHERS error condition can appear where in the EXCEPTIONS area:
|
Applying It |
Independent Exercise 1:
Independent Exercise 2:
Independent Exercise 3:
3.17.162.247