To test the following procedures, do the following A. SETTING UP TABLES WITH DATA ----------------------------- 1. Ensure that your DB does not have student and professor tables. You may delete existing tables by: SQL> @dropTables 2. Then create the tables by: SQL> @createTables 3. Create data to be loaded into your tables by executing the script: $ ./createData.pl 4. Load data into tables by executing the script: $ ./loadData.sh THESE ARE THE PROCEDURES ----------------------- testProcedure1.sql -- this procedure copies the table from student into a new table called newStudent -- the number of rows to be copied is specified as a parameter. It requires you have already defined a table called newStudent (SNAME, MAJOR). testProcedure2.sql -- this is invalid because it tries to issue a DDL statement - definining a view. Only DML statements are allowed in the procedure body testProcedure3.sql -- this illustrates the usage of Cursor for update. Again, depending on which OPEN myCursor2 is commented, you will get different results. testFunction1.sql -- this function returns the maximum salary as integer. you can make use of it in a query like: SELECT * from professor where salary = testFunction1 (); testFunction2.sql -- this function is a crazy one. It illustrates %ROWCOUNT. %ROWCOUNT will be one for myCursor (one row has been fetched). So this function will return 80000. ------------------------