use quickpass
go create proc good_order2
@goodsname varchar(20)=null
AS
if @goodsname is null
begin
select @goodsname as goodsname from customers join orders on customers.customerid=orders.customerid
end
else
begin
select orders.goodsname,orders.goodsprice,username
from customers Join orders
on customers.customerid=orders.customerid
where orders.goodsname=@goodsname
end
go
go create proc good_order2
@goodsname varchar(20)=null
AS
if @goodsname is null
begin
select @goodsname as goodsname from customers join orders on customers.customerid=orders.customerid
end
else
begin
select orders.goodsname,orders.goodsprice,username
from customers Join orders
on customers.customerid=orders.customerid
where orders.goodsname=@goodsname
end
go
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货