MySQL 存储过程相互调用举例
2017-02-07 00:58
323 查看
create procedure prccharges(in orderno char(6),out shippingCharges float(4,2),out wrapCharges float(4,2)) begin select mshippingcharges into shippingCharges from orders where corderno = orderno; select mgiftwrapcharges into wrapcharges from orders where corderno = orderno; end; create procedure prcHandLingCharges(in orderno char(6),out handlingCharges float(4,2)) begin declare ppp float(4,2); declare qqq float(4,2); call prccharges(no,p,q); set handlingCharges = p+ q; end;
上面的例子调用方法
call prcHandLingCharges('1',@af); select @af;
相关文章推荐
- MySQL存储过程相互调用并获得错误码示例
- MySQL存储过程相互调用
- MySQL存储过程相互调用并获得错误码
- MySQL存储过程相互调用并获得错误码
- MySQL存储过程相互调用
- MySQL存储过程相互调用
- c/c++调用mysql存储过程,并获得返回值
- JSP调用MySQL存储过程收藏
- mysql存储过程学习及java调用存储过程
- php调用mysql存储过程和函数的方法
- mysql存储过程学习及java调用存储过程
- MySQL存储过程例子,包含事务,输出参数,嵌套调用,游标,循环等等
- ASP.NET如何调用MySQL的存储过程
- php调用mysql存储过程和函数的方法
- 简单的PHP调用MYSQL存储过程的类
- MySQL存储过程例子,包含事务,参数,嵌套调用,游标,循环等(转)
- php调用mysql存储过程
- php调用mysql存储过程和函数的方法
- MySQL存储过程例子,包含事务,参数,嵌套调用,游标,循环等
- PHP调用MySQL的存储过程的实现代码