你的位置:首页 -> 资料分类 -> 网页专题 -> 数据库教程 -> 在存储过程的使用规范

在存储过程的使用规范

CREATE PROCEDURE [dbo].[sp_stat_info]
(
@city nvarchar(20),
@town nvarchar(20),
@village nvarchar(20)
)
as
declare @num numeric(10)
declare @yd_num numeric(10)
declare @lt_num numeric(10)
declare @gh_num numeric(10)
declare @xlt_num numeric(10)
select @num=count(jmzh) from jfxd.t_gongan_end_2
if @city='aaa'
begin
select @yd_num=count(jmzh) from jfxd.t_gongan_end_2 where SERIAL_NUMBER is not null
select @lt_num=count(jmzh) from jfxd.t_gongan_end_2 where unicom is not null
select @gh_num=count(jmzh) from jfxd.t_gongan_end_2 where tel is not null
select @xlt_num=count(jmzh) from jfxd.t_gongan_end_2 where little_tel is not null
end
else if @town='bbb'
begin
//sql语句
end
else
begin
//sql语句
end
update t_stat_info set……
GO 
网站说明
  • 遇需下载的资料,为了达到最快的下载速度,推荐使用网际快车(FlashGet),迅雷下载本站资料。
  • 如果您发现该资料不能下载,请查看常见问题通知管理员,谢谢!
  • 如果您发现该资料有不良信息,请点击这里进行举报,谢谢支持!
  • 如果您有好的资料程希望能与大家分享,我们愿意和您一起宣传!投稿请点击这里
  • [100免费网]对所提供下载的资料不拥有任何权利,其版权归该资料的合法拥有者所有。
| 关于本站 | 联系我们 | 版权声明 | 网站帮助 | 资料发布 | 报告错误 |
100免费网  Copyright© 2006 - 2008 100free.net All Rights Reserved  赣ICP备05003878号