国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

SQL IF..ELSE..在存儲過程的使用規范

2024-07-21 02:31:58
字體:
來源:轉載
供稿:網友
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 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 博野县| 德化县| 海口市| 南溪县| 温州市| 乾安县| 桐乡市| 福建省| 和龙市| 闵行区| 哈密市| 怀集县| 三穗县| 东乌| 准格尔旗| 十堰市| 思茅市| 湾仔区| 茂名市| 江源县| 江油市| 孟津县| 诏安县| 永川市| 龙山县| 新巴尔虎左旗| 公安县| 昂仁县| 长宁区| 宁阳县| 玉山县| 中宁县| 平利县| 石景山区| 北京市| 叙永县| 乌拉特中旗| 建昌县| 广汉市| 三原县| 平乐县|