CSL 333-Set-A
CSL 333-Set-A
SET A
Write a PL/SQL program to input department name and update the salary of
ANS:
--CREATE THE TABLE emp_details & dept_details
--INSERT VALUES TO IT
DECLARE
v_dept_name VARCHAR2(50);
v_dept_no NUMBER(3);
BEGIN
DBMS_INPUT.GET_LINE(v_dept_name);
FROM dept_details
UPDATE emp_details
END;
FROM emp e
GROUP BY e.city;
FROM emp e
c. Find all employees who earn more than the average salary of all employees
of their company.
ANS:
SELECT e.emp_name
FROM emp e