Create a Stored Procedure in MySql

70
Views
1
Answers

How to create a Stored Procedure in MySql?

edit | flag
William Patrick
Asked on: Jul 23, 2011 at 1:11AM

1 Answers

48
4
48

Try this..
For creating..

 delimiter //

CREATE PROCEDURE simpleprocedure
(OUT param1 INT)
   
BEGIN
     SELECT COUNT
(*) INTO param1 FROM t;
   
END//

 delimiter
;

For Calling the procedure

CALL simpleprocedure(@a);


 SELECT
@a;
edit | flag
Gokul A
Answered on: Jul 23, 2011 at 1:15AM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags