PL-SQL Procedure Lab Summary
1. Simple Message Display
Displays: "My first program"
2. Display Value of a Variable
Declares an integer X = 10 and displays the value of X
3. Addition of Two Numbers
Adds a = 10 and b = 10, then displays result c
4. Display All Records from Table
Procedure: faculty_display() - Executes: SELECT * FROM faculty;
5. Display Particular Record (with Parameter)
Procedure: emp_display(IN X INT) - Displays record from emp table where emp_id = X
6. Count of Employees
Procedure: display(OUT cnt INT) - Counts distinct emp_nm values from emp table
7. Count of Departments
Procedure: display(OUT cnt INT) - Counts distinct emp_dept values from emp table
Suggestions / Notes
1. Name Conflicts: Two procedures share the same name 'display', which can cause conflicts.
Consider renaming them uniquely, e.g., display_emp_count, display_dept_count.
2. Formatting: Use consistent casing (DELIMITER, DROP PROCEDURE) and indentation to
improve readability.