Skip to content

Lab Exercises

Lab 1: Conditional PL/SQL

Due: February 9, 2026

Practice writing PL/SQL blocks with IF/ELSIF/ELSE logic, procedures, and functions.

Key exercises:

  • Write AddMe — basic enrollment procedure
  • Write AddMe2 — enrollment with standing check
  • Classify students by GPA

See Activity: Conditionals for practice problems.


Lab 2: SQL in PL/SQL

Due: February 25, 2026

Part 3 exercises (Q1-Q7) building increasingly sophisticated enrollment procedures:

  1. AddMe — basic insert
  2. AddMe2 — standing validation
  3. AddMe3 — credit limit check (≤ 15 per semester)
  4. Update_GPA — weighted GPA calculation
  5. Validate_Student — existence check
  6. Validate_Credit_Limit — reusable credit validation
  7. Combine Validate_Credit_Limit into AddMe

See SQL in PL/SQL Exercises for all problems and solutions.


Lab 3: Cursors

Practice using explicit cursors and cursor FOR loops:

  1. p_update_standing — update all students' standing based on total credits
  2. Enrollment report — nested cursors for formatted output

See Cursor Exercises for problems and solutions.