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
how can we encrypt and decrypt a data present in a mysql table using mysql? : Sql dba
how to include comments in sql statements? : Sql dba
What can I use instead of union in sql?
Is sql port 1433 encrypted?
Can we use threading in pl/sql?
Is and as keyword in pl sql?
Are subqueries faster than joins?
tell us something about heap tables. : Sql dba
What does seeding a database mean?
Is microsoft sql free?
What is the use of nvl function?
Why do we need cursors in pl sql?
Can you upgrade sql express to full sql?
how to dump a table to a file with 'mysqldump'? : Sql dba
How does rowid help in running a query faster?