LXM21

2021-04-27   阅读量: 1324

Mysql

这个存储代码在mysql中应该怎么改

这个存储代码在mysql中应该怎么改

CREATE PROCEDURE XSDAB_ADD
(@XH VARCHAR(20),
@XM VARCHAR(40),
@XB BIT =0,
@JG VARCHAR(20),
@BJMC VARCHAR(40),
@SZX VARCHAR(40),
@SSXY VARCHAR(40),
@DJRY VARCHAR(20)
--,@LRRQ DATETIME)
AS

 DECLARE @LRRQ DATETIME
 SET @LRRQ=GETDATE()
 INSERT INTO XSDAB(XH,XM,XB,JG,BJMC,SZX,SSXY,DJRY,LRRQ)
 VALUES(@XH,@XM,@XB,@JG,@BJMC,@SZX,@SSXY,@DJRY,@LRRQ)

修改:

DELIMITER //
CREATE PROCEDURE XSDAB_ADD
(in XH VARCHAR(20),
in XM VARCHAR(40),
in JG VARCHAR(20),
in BJMC VARCHAR(40),
in SZX VARCHAR(40),
in SSXY VARCHAR(40),
in DJRY VARCHAR(20),
in LRRQ DATETIME)
begin
 DECLARE XB BIT;
 DECLARE LRRQ DATETIME;
 SET @LRRQ=GETDATE(),@XB=0;
 INSERT INTO XSDAB(XH,XM,XB,JG,BJMC,SZX,SSXY,DJRY,LRRQ) VALUES(@XH,@XM,@XB,@JG,@BJMC,@SZX,@SSXY,@DJRY,@LRRQ);
 END //
DELIMITER ;


20.6455 2 0 关注作者 收藏

评论(0)


暂无数据

推荐课程