Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

what is an extent ? : Sql dba

1158


How do I run a script in sql developer?

997


what is 'trigger' in sql? : Sql dba

1145


How many types of triggers exist in pl/sql?

1130


How do I install sql?

1045


What is input buffer in sql*plus?

1292


Is id a reserved word in sql?

1187


Which sql most popular?

1029


What is the file extension for sql database?

1062


where are cookies actually stored on the hard disk? : Sql dba

1079


How do you add a column to a table?

1103


What does fetching a cursor do?

1133


What is mdb stand for?

1057


Can a foreign key be null?

1142


what is try_catch block in procedure

1808