CSDN博客

img YangYuWeb

自定义函数

发表于2004/9/28 14:48:00  566人阅读

分类: SQL

create function return_fac_count
(
  @PROD_SMALL_KIND_ID int,
  @PROD_FAC_ID int
)
returns int
as
begin
  return(Select count(*) as prod_count  FROM PROD_SUMMARY_INFO AS S,PROD_PRICE AS P,FAC_INFO AS N WHERE N.FAC_INFO_ID = S.PROD_FAC_ID AND S.ISENABLE=1 AND S.IS_VISIBLE=1 AND S.PROD_ID=P.PROD_ID AND S.PROD_SMALL_KIND_ID =@PROD_SMALL_KIND_ID And S.PROD_FAC_ID=@PROD_FAC_ID)
end

 

阅读全文
0 0

相关文章推荐

img
取 消
img