You are on page 1of 6

1. Writing PL/SQL Blocks with basic programming constructs by including following: a. Sequential Statements b. unconstrained loop c. If...then...Else, IF...ELSIF...ELSE...

END IF 2. Writing PL/SQL Blocks with basic programming constructs by including following: a.. Insert value in while loop b. CASE WHEN statement with variable c. Use GoTO to jump out of a loop, NULL as a statement inside IF 3. Procedures in PL/SQL Block a. Create an empty procedure, replace a procedure and call procedure b. Create a stored procedure and call it c. Define procedure to insert data d. A forward declaration of procedure 4. Functions in PL/SQL Block a. Define and call a function b. Define and use function in select clause, Call function in dbms_output.put_line c. Recursive function d. Count Employee from a function and return value back e. Call function and store the return value to a variable 5. Cursors with a. Types: Implicit Cursor and Explicit Cursor b. Cursor for loops c. A program for simple loop and fetching the cursor. d. Create a cursor in for statement.

6. Cursors with a. A cursor with sub queries b. Combination of PL/SQL, cursor and for loop c. Parameterized cursors d. Cursor Variables 7. Creating and working with Sequences 8. Study of transaction and locks

Sub Questions 1. Writing PL/SQL Blocks with basic programming constructs by including following: a. Sequential Statements (hello world in pl/sql block) b. unconstrained loop a. Create a table employee with one of the field as start date and salary. Write a PL/SQL block to increase the salary of the employee whose date of joining is before specified date in the if condition by 15% otherwise increase the salary of the employee by 5%. c. If...then...Else, IF...ELSIF...ELSE... END IF a. Create a table place with attributes room_id, building, room_number, number_seats, description. Write a PL/SQL block to comment on the type of place as Fairly Small, a little bigger, lots of room depending upon the value of the number_seats for a given room_id. 2. Writing PL/SQL Blocks with basic programming constructs by including following: a.. Insert value in while loop a. Create a table Suppliers. Write a PL/SQL block to insert values in the table by while loop. b. CASE WHEN statement with variable a. Create a table lecturer with one of the attribute as major subject. Write a PL/SQL block with CASE WHEN statement with variable which print the course name depending upon the major subject for the specified lecturer id. c. Use GoTO to jump out of a loop, NULL as a statement inside IF a. Write a PL/SQL block which uses GoTO to jump out of a loop

b. Create a table MyTable with attributes num_col and char_col. Write a PL/SQL block to insert values in the table and run NULL as a statement inside one of the IF statement. 3. Procedures in PL/SQL Block a. Create an empty procedure, replace a procedure and call procedure a.Create an empty procedure or replace a procedure with Hello World and execute the same. b. Create a stored procedure and call it Write a PL/SQL block to define and call procedure to swap two numbers. c. Define procedure to insert data a. Write a PL/SQL block to define procedure to insert data in the Employee table. d. A forward declaration of procedure 4. Functions in PL/SQL Block a. Define and call a function (hello world) b. Define and use function in select clause, Call function in dbms_output.put_line (add of two numbers) c. Recursive function (factorial,Fibonacci) d. Count Employee from a function and return value back a. Create a table employee. Write a PL/SQL block which acts as a Recursive function listing which takes two parameters one is of type number and one is of type varchar, to display employee name. e. Call function and store the return value to a variable same as above 5. Cursors with

a. Types: Implicit Cursor and Explicit Cursor a. Create a table employee. Insert 5 meaning full records in it. Using implicit cursor Update the salary of the specified employee id if that id is available in the table. And using SQL%FOUND return the appropriate message on the screen. b. Create a table employee. Insert 5 meaning full records in it. Write explicit cursor to accept id of the employee and print its first and last name. b. Cursor for loops a. Create a table employee. Insert 5 meaning full records in it. Use pl/sql, cursor and for loop to count no of records in the given table. c. A program for simple loop and fetching the cursor. Same as above d. Create a cursor in for statement. a.Create a table called dept .Insert 5 records in it.Use pl/sql cursor and use for loop to display the data . 6. Cursors with a. A cursor with sub queries a. Create a table employee. Create a table Job with emp_no and Job_title. Insert 5 meaning full records in both tables. Write a Cursor for loop with FROM clause of the SELECT statement which contains a subqueries that select

the total number of employee department.

enroll

in

each

b. Combination of PL/SQL, cursor and for loop a. Create a table employee. Insert 5 meaning full records in it. Create a cursor to display last name of employee till the last record is found by for loop. c. Parameterized cursors e. Create a table employee. Insert 5 meaning full records in it. Create a parameterized cursor to find given employee in the table. d. Cursor Variables

a. Write a program to define cursor variable of type strongly and weakly. 7. Creating and working with Sequences a. Create sequence deptno_seq start with 50 increment by 10 8. Study of transaction and locks a.Create a table Employee and customer. Insert 5 meaningful records in both tables. Perofm following operations on tables by single transaction query. Committee Employee transaction and rollback Customer transaction.(Partial Rollback) i. Update Employee by increasing salary of all employees by 5000. Increase Bonus by 1000 for specified employee. ii. Update Customer by increasing purchase by 5000 for a specified customer id. b. Create Employee and position table. Simultaneously access Employee and position in updated mode on two separate windows and ask access of other table to experience a deadlock. c. Create tables and resolve deadlock by setting Lock timeout

You might also like