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
Is merge a dml statement?
Is sql similar to python?
What is mutating sql table?
How many types of triggers exist in pl/sql?
what is a materialized view? : Sql dba
What's the difference between a primary key and a clustered index?
How would you pass hints to the sql processor?
What is primary key and foreign key with example?
what is foreign key? : Sql dba
How many parts of a pl sql block are optional?
What is basic structure of pl sql?
What is lookup table in sql?
What is query optimization in sql?
Name the operator which is used in the query for pattern matching?
what is a database transaction? : Sql dba