随笔分类 -  存储过程

摘要:案例: Author: HongMan.Wen-- Create date: <Create Date,,>-- Description: 整改完成率统计 CREATE PROCEDURE [dbo].[proc_CountHiddenRanking] -- Add the parameters f 阅读全文
posted @ 2017-12-20 13:40 飞刀软件 阅读(682) 评论(0) 推荐(0)
摘要:最近第一次使用sql表变量,感觉挺好用,案例如下: declare @aaa table(Com_SiteGroupID uniqueidentifier) --定义表变量 往表变量里写数据 insert into @aaa select Com_SiteGroupID from Com_SiteG 阅读全文
posted @ 2017-05-21 12:26 飞刀软件 阅读(1575) 评论(0) 推荐(0)
摘要:最近在项目中需要做一些复杂的图表统计,所以使用了存储过程和游标,案例如下: ALTER PROCEDURE [dbo].[proc_CountSiteGroupByAreaSiteType] -- Add the parameters for the stored procedure hereASB 阅读全文
posted @ 2017-05-10 16:10 飞刀软件 阅读(302) 评论(0) 推荐(0)
摘要:CREATE PROCEDURE proc_CountSiteGroupByStructure -- Add the parameters for the stored procedure here @structureType int --传递参数ASBEGIN -- SET NOCOUNT ON 阅读全文
posted @ 2017-04-25 14:53 飞刀软件 阅读(2962) 评论(0) 推荐(0)
摘要:在orm开发中也会用到存储过程,案例如下: Create proc [dbo].[proc_GetCompanyStructureByDepartStructureId] @Com_StructureId uniqueidentifierASBEGIN declare @structureType 阅读全文
posted @ 2017-03-31 12:18 飞刀软件 阅读(976) 评论(0) 推荐(0)