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

Is merge a dml statement?

924


Is sql similar to python?

919


What is mutating sql table?

1041


How many types of triggers exist in pl/sql?

1011


what is a materialized view? : Sql dba

999


What's the difference between a primary key and a clustered index?

947


How would you pass hints to the sql processor?

922


What is primary key and foreign key with example?

876


what is foreign key? : Sql dba

971


How many parts of a pl sql block are optional?

1035


What is basic structure of pl sql?

990


What is lookup table in sql?

982


What is query optimization in sql?

941


Name the operator which is used in the query for pattern matching?

894


what is a database transaction? : Sql dba

1108