SQL存储代码试题.docVIP

  • 12
  • 0
  • 约6.5千字
  • 约 9页
  • 2015-08-07 发布于湖北
  • 举报
SQL存储代码试题.doc

(1)根据指定客户的查询该客户相关订单信息的存储过程。 create proc customer_1 @CustomerName varchar(50) as if exists(select*from Customer where CompanyName=@CustomerName) select customer.CompanyName 公司名称, ductName 商品名称, product.Price 单价, Sell_order.sellOrderNumber 数量,Sell_order.SellOrderDATE 订货日期from customer join Sell_order on customer.customerID = Sell_order.customerID join product on Sell_ductID = ductID where customer.CompanyName = @customername else print 不存在该客户 customer_1 通恒机械有限公司 (2)根据指定客户的查询该客户订购商品总金额的存储过程。(有输出参数) create proc sumprice @CompanyName varchar(50),@sum int output as if exists

文档评论(0)

1亿VIP精品文档

相关文档