how to Create simple stored procedure which returns resultset in mysql
Cre开发者_Python百科ate simple stored procedure which returns resultset in mysql
DELIMITER $$
DROP PROCEDURE IF EXISTS `something`.`PName` $$
CREATE PROCEDURE `Something`.`PName` (cid INT)
BEGIN
SELECT * FROM table;
END $$
DELIMITER ;
----Very simple store procedure
DELIMITER //
CREATE PROCEDURE GetCountry()
BEGIN
SELECT *
FROM Country;
END //
DELIMITER ;
精彩评论