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

Can a key be both primary and foreign?

980


What is the purpose of cursors in pl/sql?

1123


How does stored procedure reduce network traffic?

996


What are different categories of sql commands?

1115


Explain cursor types?

1002


what are aggregate and scalar functions? : Sql dba

1041


How delete a row in sql?

974


what does the t-sql command ident_current does? : Transact sql

965


What is sql clause?

1035


What are the benefits of pl/sql packages?

1091


Differentiate between syntax and runtime errors.

1167


What is latest version of sql?

1029


What is the function that is used to transfer a pl/sql table log to a database table?

988


Can we create foreign key without primary key?

966


How do you optimize a stored procedure in sql?

926