Lab 13.1 Exercises13.1.1 Create Stored Functions
13.1.2 Make Use of FunctionsIn this exercise, you will learn how to make use of the stored functions that you created in a) | Use the following anonymous block to run the function. When prompted, enter 350. Then try other numbers. What is produced?SET SERVEROUTPUT ON DECLARE v_description VARCHAR2(50); BEGIN v_description := show_description(&sv_cnumber); DBMS_OUTPUT.PUT_LINE(v_description); END; | ||||
| b) | Now create a similar anonymous block to make use of the function id_is_good. Try running it for a number of different IDs. |
13.1.3 Invoke Functions in SQL Statements
| a) | Now you will try another method of using a stored function. Before you type the following SELECT statement, think about what the function show_description is doing. Will this statement produce an error? If not, then what will be displayed?SELECT course_no, show_description(course_no) FROM course; |