首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

函数功课

2012-08-26 
函数作业--函数create function fnGetAllAccept(@SDate datetime, @wh_id int, @cust_id int)returns tabl

函数作业
--函数
create function fnGetAllAccept(@SDate datetime, @wh_id int, @cust_id int)
returns table as
             return (select Acc_code, Cust_id, Acc_type, Acc_remark
             from AcceptBlotter
              where Wh_id = @wh_id AND cust_id = @cust_id AND Acc_date >= @SDate
  )

--测试
select * from fnGetAllAccept('2000-1-1', 10, 100)

热点排行