cs405 assignment
cs405 assignment
department and check whether this department have any vacancies or not. If any vacancies, how many
vacancies are in that department (Using If-Else Statement).
DECLARE
v_employee_count NUMBER;
v_max_employees NUMBER;
v_vacancies NUMBER;
BEGIN
SELECT COUNT(*)
INTO v_employee_count
FROM employees
SELECT max_employees
INTO v_max_employees
FROM departments
END IF;
EXCEPTION
END;
Question # 02 (10pts) Write a PL/SQL program to display the job IDs, titles, and minimum salaries of all
jobs (Using While Loop). Sample output is mentioned below:
DECLARE
CURSOR job_cursor IS
v_job_id jobs.job_id%TYPE;
v_job_title jobs.job_title%TYPE;
v_min_salary jobs.min_salary%TYPE;
BEGIN
OPEN job_cursor;
LOOP
IF job_cursor%NOTFOUND THEN
ELSE
END IF;
END LOOP;
CLOSE job_cursor;
EXCEPTION
END;