开发者

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 ;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜