Skip to main content
 首页 » 数据库

mysql存储过程

2022年07月19日159sharpest

BEGIN
 
 DECLARE orderNo varchar(100) DEFAULT null;
 select order_no into orderNo from t_orderpay where order_no=p2 and step='2';
 if orderNo <>'' and left(orderNo,3)='JXS'
  then
  insert into t_message(mtype,title,createtime) VALUES(p1,'测试',now());
 END IF ;
END


本文参考链接:https://www.cnblogs.com/xihong2014/p/5502504.html