国产探花免费观看_亚洲丰满少妇自慰呻吟_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 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 东丰县| 沾化县| 巨鹿县| 台南县| 禄丰县| 博爱县| 榆社县| 永仁县| 深水埗区| 莱西市| 江孜县| 环江| 太白县| 天水市| 岚皋县| 民丰县| 会宁县| 丽水市| 营口市| 永昌县| 响水县| 中江县| 河津市| 江都市| 玉山县| 三原县| 太白县| 天全县| 玉龙| 忻州市| 永济市| 灵台县| 内江市| 伊川县| 衢州市| 右玉县| 隆回县| 庄浪县| 泸西县| 彰化市| 于田县|