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
If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????
Can we create view in stored procedure?
What is foreign key and example?
Can we commit inside a trigger?
what is a scheduled jobs or what is a scheduled tasks? : Sql dba
What are the different types of functions in sql?
Why do we use set serveroutput on?
Which is faster subquery or join?
What do you mean by query optimization?
What are data types in pl sql?
what is 'mysqladmin' in mysql? : Sql dba
When to use inner join and left join?
What is a data manipulation language?
What are the advantages of pl sql over sql?
What is a sql select statement?