日期:2014-05-17  浏览次数:20511 次

数据库存储过程的问题,求助。
 (9)创建存储过程,要求将OrderMaster表中每一个订单所对应的明细数据信息按规定格式输出,
 格式如图7-1所示。                                    
--===================订单及其明细数据信息====================                                         
---------------------------------------------------                                                 
订单编号      200801090001                                                                         
---------------------------------------------------                                                 
商品编号         数量     价格                                                           
P20050001      2      222                                                            
P20050002      2       222                                                              
P20050003      2      1                                                           
-----------------------------------
合计订单总金额      3103.50  
create procedure biaoge 
as
begin


declare @orderno char(20),@productno char(20),@quantity int,@price    numeric(7,2)
declare&nb