且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

产品销售的存储过程

更新时间:2023-11-29 23:16:28

您可以获取所有与产品ID不符的记录的总和.

将会是这样的:

You can get the sum of all records where the product ID doesn''t match the one in question.

It will be something like this:

@comparisonProductID

select 
     sum(p.qty_supplied)
   , sum(p.qty_returned)
from
   product_info_table p
where
   p.product ID <> @comparisonProductID



干杯.



Cheers.