Introduction to MySQL Stored Procedures


Source:http://www.mysqltutorial.org/introduction-to-sql-stored-procedures.aspx

create Stored Procedures:
DELIMITER $$
 CREATE PROCEDURE getAllUser()
   BEGIN
   SELECT *  FROM user_details where userid >5;
   END $$
 DELIMITER ;
-------------------------

Call Stored Procedures:
call getAllUser();
---------------------------

Drop Stored Procedures:
DROP PROCEDURE IF EXISTS getAllUser;

Demo:



Share on Google Plus

About Ram Pukar

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment