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
what is an extent ? : Sql dba
How do I run a script in sql developer?
what is 'trigger' in sql? : Sql dba
How many types of triggers exist in pl/sql?
How do I install sql?
What is input buffer in sql*plus?
Is id a reserved word in sql?
Which sql most popular?
What is the file extension for sql database?
where are cookies actually stored on the hard disk? : Sql dba
How do you add a column to a table?
What does fetching a cursor do?
What is mdb stand for?
Can a foreign key be null?
what is try_catch block in procedure