Write a procedure to return the month and the number of
developers joined in each month (cursor )
Answer Posted / prabhudatta barick
CREATE OR REPALCE PROCEDURE EMP_PRO
IS
BEGIN
FOR EMP_CUR IN(SELECT SUBSTR(EMP_DOA,4,3) MONTH,
COUNT(*) NO_OF_EMP
FROM HRD_EMPLOYEETB
GROUP BY SUBSTR(EMP_DOA,4,3)
ORDER BY 1)
LOOP
DBMS_OUTPUT.PUT_LINE(EMP_CUR.MONTH||' '||EMP_CUR.NO_OF_EMP);
END LOOP;
END;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why is theta join required?
How do I save a sql query?
What are the types of dbms?
What programs use sql?
How many types of keys are there in sql?
What is the difference between count 1 and count (*) in a sql query?
What is the usage of when clause in trigger?
How do rank () and dense_rank () differ?
what are tables and fields? : Sql dba
How do you explain an index?
How do I save a stored procedure?
What is left join in sql?
How do you modify a column in sql?
What does where 1 1 mean in sql?
How do you identify a primary key?