开发者

how to Create simple stored procedure which returns resultset in mysql

开发者 https://www.devze.com 2023-01-05 17:54 出处:网络
Cre开发者_Python百科ate simple stored procedure which returns resultset in mysqlDELIMITER $$ DROP PROCEDURE IF EXISTS `something`.`PName` $$

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

精彩评论

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