Home >Database >Mysql Tutorial >mySql存储过程的结构

mySql存储过程的结构

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 15:21:041128browse

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 无参数的存储过程 CREATE PROCEDURE P_XSRBB() BEGIN DECLARE VP1 VARCHAR(20); SET VP1=4; SELECT VP1 FROM DUAL; END; CALL P_XSRBB(); 带输入参数的存储过程 DROP PROCEDURE IF EXISTS P_

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入

  无参数的存储过程

  CREATE PROCEDURE P_XSRBB()

  BEGIN

  DECLARE VP1 VARCHAR(20);

  SET VP1=4;

  SELECT VP1 FROM DUAL;

  END;

  CALL P_XSRBB();

  带输入参数的存储过程

  DROP PROCEDURE IF EXISTS P_XSRBB;

  CREATE PROCEDURE P_XSRBB(in vp2 INT)

  BEGIN

  DECLARE VP1 VARCHAR(20);

  SET VP1=4;

  SELECT VP2 FROM DUAL;

  END;

  CALL P_XSRBB(3434);

mySql存储过程的结构

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn