`

SQL SERVER 存储过程

阅读更多
USE [fau]
GO
/****** 对象:  StoredProcedure [dbo].[sp_Check_Emp_Holiday]    脚本日期: 06/09/2010 13:34:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[sp_Check_Emp_Holiday]
as
declare	@E_ID int,
        @E_TYPE nvarchar(50),
        @E_HIRE_DATE datetime,
        @E_SOCIAL_WORK_DATE datetime
declare @Holiday numeric(4, 2),
        @Days int
--定义一个游标并打开它
begin
declare mycursor cursor for select E_ID,E_TYPE,E_SOCIAL_WORK_DATE,E_HIRE_DATE from dbo.EMPLOYEE_INFO 
	open mycursor
	--开始提取记录,放入指定的变量
	fetch next from mycursor into @E_ID,@E_TYPE,@E_SOCIAL_WORK_DATE,@E_HIRE_DATE
	while @@fetch_status = 0 
	  begin
		  set @E_SOCIAL_WORK_DATE = DATEDIFF(day,@E_SOCIAL_WORK_DATE,getdate())
		  set @Holiday=0
    /*员工类型为Loacl*/
	if (@E_TYPE=N'Local')
     begin
   	    /*1.员工加入佛吉亚工作未满一年时,年假的计算按月份比例计算(每月为1.25天), 15日前入职(含15日)不计算当月年假,15日后入职员工当月年假计算为1.25天。*/
			
	  if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
		  begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=1.25*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=1.25*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
/* 员工加入佛吉亚后的第二年至第五年*/	
		/*员工加入佛吉亚后的第十一年至第二十年*/	
	  --else if (CONVERT(int,@E_HIRE_DATE,0)/365.0>10 and CONVERT(int,@E_HIRE_DATE,0)/365.0<=20)
	  else if (dbo.ISOyear(@E_HIRE_DATE)>1 and dbo.ISOyear(@E_HIRE_DATE)<=5) 
	     set @Holiday=15
		/* 员工加入佛吉亚后的第六年至第十年*/	
	  else if (dbo.ISOyear(@E_HIRE_DATE)>5 and dbo.ISOyear(@E_HIRE_DATE)<=10)
		 set @Holiday=17
		/*员工加入佛吉亚后的第十一年至第二十年*/	
	  else if (dbo.ISOyear(@E_HIRE_DATE)>10 and dbo.ISOyear(@E_HIRE_DATE)<=20)
		 set @Holiday=20
	  else 
		 set @Holiday=20
     end
     /*当员工类型为Expats*/
     else if (@E_TYPE=N'Expats')
	  begin
	    if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
	     begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=24/12*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=24/12*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
		 else
		   begin
			set @Holiday=24
		   end
	  end
     /*当员工类型为Secondee*/
	else if (@E_TYPE='Secondee')
		begin
		 if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
		  begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=24/12*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=24/12*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
		  else
			begin
				set @Holiday=24
			end
        end
		 /*当员工类型为VIE*/
	else if (@E_TYPE=N'VIE')
		begin
		if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
	  begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=30.00/12*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=30.00/12*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
			else
			begin
			  set @Holiday=30
			end
		end
    /*当员工类型为spcial*/
    else if (@E_TYPE=N'special')
		begin
		if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
	      begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=20.00/12*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=20.00/12*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
			else
			begin
			  set @Holiday=20
			end
		end
  /*当员工类型为spcial2*/
   else if (@E_TYPE=N'special2')
		begin
		if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
	      begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=24.00/12*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=24.00/12*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
			else
			begin
			  set @Holiday=24
			end
		end
  /*当员工类型为spcial3*/
	else if (@E_TYPE=N'special3')
		begin
		if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
	      begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=26.00/12*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=26.00/12*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
			else
			begin
			  set @Holiday=26
			end
		end
      --update dbo.EMPLOYEE_HOLIDAY set H_CREATE_NUM=@Holiday where H_STATUS='Y' and E_ID=@E_ID
      exec dbo.SP_MODIFY_HOLIDAY @E_ID,@Holiday
      fetch next from mycursor into @E_ID,@E_TYPE,@E_SOCIAL_WORK_DATE,@E_HIRE_DATE
      end
       --关闭游标,释放内存
      close mycursor
      deallocate mycursor
end



USE [fau]
GO
/****** 对象:  StoredProcedure [dbo].[SP_EMP_HOLIDAY]    脚本日期: 06/09/2010 13:35:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[SP_EMP_HOLIDAY]
as

declare	@E_ID int,
        @E_TYPE nvarchar(50),
        @E_HIRE_DATE datetime,
        @E_SOCIAL_WORK_DATE datetime
declare @Holiday numeric(4, 2),
        @Days int
--定义一个游标并打开它
declare tablecursor cursor for select E_ID,E_TYPE,E_SOCIAL_WORK_DATE,E_HIRE_DATE from dbo.EMPLOYEE_INFO 

begin
	open tablecursor
	--开始提取记录,放入指定的变量
	fetch next from tablecursor into @E_ID,@E_TYPE,@E_SOCIAL_WORK_DATE,@E_HIRE_DATE
	while @@fetch_status = 0 
	  begin
		  update dbo.EMPLOYEE_HOLIDAY
		  set H_STATUS='N'
		  where E_ID=@E_ID
		  set @E_SOCIAL_WORK_DATE = DATEDIFF(day,@E_SOCIAL_WORK_DATE,getdate())
		  set @Holiday=0
    /*员工类型为Loacl*/
	if (@E_TYPE=N'Local')
     begin
   	    /*1.员工加入佛吉亚工作未满一年时,年假的计算按月份比例计算(每月为1.25天), 15日前入职(含15日)不计算当月年假,15日后入职员工当月年假计算为1.25天。*/
			
	  if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
		  begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=1.25*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=1.25*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
/* 员工加入佛吉亚后的第二年至第五年*/	
	  else if (dbo.ISOyear(@E_HIRE_DATE)>1 and dbo.ISOyear(@E_HIRE_DATE)<=5) 
	     set @Holiday=15
		/* 员工加入佛吉亚后的第六年至第十年*/	
	  else if (dbo.ISOyear(@E_HIRE_DATE)>5 and dbo.ISOyear(@E_HIRE_DATE)<=10)
		 set @Holiday=17
		/*员工加入佛吉亚后的第十一年至第二十年*/	
	  else if (dbo.ISOyear(@E_HIRE_DATE)>10 and dbo.ISOyear(@E_HIRE_DATE)<=20)
		 set @Holiday=20
	  else 
		 set @Holiday=20
     end
     /*当员工类型为Expats*/
     else if (@E_TYPE=N'Expats')
	  begin
	    if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
	     begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=24/12*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=24/12*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
		 else
		   begin
			set @Holiday=24
		   end
	  end
     /*当员工类型为Secondee*/
	else if (@E_TYPE='Secondee')
		begin
		 if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
		  begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=24/12*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=24/12*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
		  else
			begin
				set @Holiday=24
			end
        end
		 /*当员工类型为VIE*/
	else if (@E_TYPE=N'VIE')
		begin
		if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
	      begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=30.00/12*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=30.00/12*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
			else
			begin
			  set @Holiday=30
			end
		end
    /*当员工类型为spcial*/
    else if (@E_TYPE=N'special')
		begin
		if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
	      begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=20.00/12*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=20.00/12*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
			else
			begin
			  set @Holiday=20
			end
		end
  /*当员工类型为spcial2*/
   else if (@E_TYPE=N'special2')
		begin
		if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
	      begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=24.00/12*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=24.00/12*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
			else
			begin
			  set @Holiday=24
			end
		end
  /*当员工类型为spcial3*/
	else if (@E_TYPE=N'special3')
		begin
		if(DATEDIFF(month,@E_HIRE_DATE,getdate())<=12)
	      begin
           set @Days=DATEPART(day, @E_HIRE_DATE)
           if (@Days<=15)
               set @Holiday=26.00/12*DATEDIFF(month,@E_HIRE_DATE,getdate())
           else
               set @Holiday=26.00/12*(DATEDIFF(month,@E_HIRE_DATE,getdate())-1)
		  end 
			else
			begin
			  set @Holiday=26
			end
		end
         -- print(@Holiday)
     	 insert into dbo.EMPLOYEE_HOLIDAY (E_ID,EH_YEAR,H_CREATE_NUM,H_CREATE_DATE,H_STATUS) values
		 (@E_ID,year(getdate()),@Holiday,getdate(),N'Y')
      fetch next from tablecursor into @E_ID,@E_TYPE,@E_SOCIAL_WORK_DATE,@E_HIRE_DATE
      end
       --关闭游标,释放内存
      close tablecursor
      deallocate tablecursor
end

USE [fau]
GO
/****** 对象:  StoredProcedure [dbo].[SP_MODIFY_HOLIDAY]    脚本日期: 06/09/2010 13:35:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[SP_MODIFY_HOLIDAY]
(
 @E_ID int,
 @Holiday numeric(4, 2)
)
AS
declare	@H_CREATE_NUM numeric(4, 2)
declare mycursor1 cursor for select H_CREATE_NUM from dbo.EMPLOYEE_HOLIDAY where E_ID=@E_ID and H_STATUS='Y'
BEGIN
	open mycursor1
	--开始提取记录,放入指定的变量
	fetch next from mycursor1 into @H_CREATE_NUM
    while @@fetch_status = 0 
	  begin
        if(@H_CREATE_NUM!=@Holiday)
           begin
             /*print @E_ID
             print @H_CREATE_NUM;
             print @Holiday;*/
             update  dbo.EMPLOYEE_HOLIDAY set H_STATUS='N' where E_ID=@E_ID and H_STATUS='Y'
             insert into dbo.EMPLOYEE_HOLIDAY (E_ID,EH_YEAR,H_CREATE_NUM,H_CREATE_DATE,H_STATUS) values
		     (@E_ID,year(getdate()),@Holiday,getdate(),N'Y')
           end
         break;
      end
      --关闭游标,释放内存
      close mycursor1
      deallocate mycursor1
END

USE [fau]
GO
/****** 对象:  UserDefinedFunction [dbo].[ISOyear]    脚本日期: 06/09/2010 13:36:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE FUNCTION [dbo].[ISOyear] (@DATE datetime)
RETURNS int
WITH EXECUTE AS CALLER
AS
BEGIN
     DECLARE @ISOyear int;
     if(Year(Getdate())>Year(@DATE))
        set @ISOyear=Year(Getdate())-Year(@DATE)
     if(Month(Getdate())=Month(@DATE))
       begin
         if(Day(Getdate())>=Day(@DATE))
           set @ISOyear=@ISOyear+1
       end 
      else if (Month(Getdate())>Month(@DATE)) 
           set @ISOyear=@ISOyear+1
      RETURN(@ISOyear);
END;


set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go


	ALTER PROCEDURE [dbo].[sp_alterdiagram]
	(
		@diagramname 	sysname,
		@owner_id	int	= null,
		@version 	int,
		@definition 	varbinary(max)
	)
	WITH EXECUTE AS 'dbo'
	AS
	BEGIN
		set nocount on
	
		declare @theId 			int
		declare @retval 		int
		declare @IsDbo 			int
		
		declare @UIDFound 		int
		declare @DiagId			int
		declare @ShouldChangeUID	int
	
		if(@diagramname is null)
		begin
			RAISERROR ('Invalid ARG', 16, 1)
			return -1
		end
	
		execute as caller;
		select @theId = DATABASE_PRINCIPAL_ID();	 
		select @IsDbo = IS_MEMBER(N'db_owner'); 
		if(@owner_id is null)
			select @owner_id = @theId;
		revert;
	
		select @ShouldChangeUID = 0
		select @DiagId = diagram_id, @UIDFound = principal_id from dbo.sysdiagrams where principal_id = @owner_id and name = @diagramname 
		
		if(@DiagId IS NULL or (@IsDbo = 0 and @theId <> @UIDFound))
		begin
			RAISERROR ('Diagram does not exist or you do not have permission.', 16, 1);
			return -3
		end
	
		if(@IsDbo <> 0)
		begin
			if(@UIDFound is null or USER_NAME(@UIDFound) is null) -- invalid principal_id
			begin
				select @ShouldChangeUID = 1 ;
			end
		end

		-- update dds data			
		update dbo.sysdiagrams set definition = @definition where diagram_id = @DiagId ;

		-- change owner
		if(@ShouldChangeUID = 1)
			update dbo.sysdiagrams set principal_id = @theId where diagram_id = @DiagId ;

		-- update dds version
		if(@version is not null)
			update dbo.sysdiagrams set version = @version where diagram_id = @DiagId ;

		return 0
	END
	



set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go


	ALTER PROCEDURE [dbo].[sp_creatediagram]
	(
		@diagramname 	sysname,
		@owner_id		int	= null, 	
		@version 		int,
		@definition 	varbinary(max)
	)
	WITH EXECUTE AS 'dbo'
	AS
	BEGIN
		set nocount on
	
		declare @theId int
		declare @retval int
		declare @IsDbo	int
		declare @userName sysname
		if(@version is null or @diagramname is null)
		begin
			RAISERROR (N'E_INVALIDARG', 16, 1);
			return -1
		end
	
		execute as caller;
		select @theId = DATABASE_PRINCIPAL_ID(); 
		select @IsDbo = IS_MEMBER(N'db_owner');
		revert; 
		
		if @owner_id is null
		begin
			select @owner_id = @theId;
		end
		else
		begin
			if @theId <> @owner_id
			begin
				if @IsDbo = 0
				begin
					RAISERROR (N'E_INVALIDARG', 16, 1);
					return -1
				end
				select @theId = @owner_id
			end
		end
		-- next 2 line only for test, will be removed after define name unique
		if EXISTS(select diagram_id from dbo.sysdiagrams where principal_id = @theId and name = @diagramname)
		begin
			RAISERROR ('The name is already used.', 16, 1);
			return -2
		end
	
		insert into dbo.sysdiagrams(name, principal_id , version, definition)
				VALUES(@diagramname, @theId, @version, @definition) ;
		
		select @retval = @@IDENTITY 
		return @retval
	END
	
	
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go


	ALTER PROCEDURE [dbo].[sp_dropdiagram]
	(
		@diagramname 	sysname,
		@owner_id	int	= null
	)
	WITH EXECUTE AS 'dbo'
	AS
	BEGIN
		set nocount on
		declare @theId 			int
		declare @IsDbo 			int
		
		declare @UIDFound 		int
		declare @DiagId			int
	
		if(@diagramname is null)
		begin
			RAISERROR ('Invalid value', 16, 1);
			return -1
		end
	
		EXECUTE AS CALLER;
		select @theId = DATABASE_PRINCIPAL_ID();
		select @IsDbo = IS_MEMBER(N'db_owner'); 
		if(@owner_id is null)
			select @owner_id = @theId;
		REVERT; 
		
		select @DiagId = diagram_id, @UIDFound = principal_id from dbo.sysdiagrams where principal_id = @owner_id and name = @diagramname 
		if(@DiagId IS NULL or (@IsDbo = 0 and @UIDFound <> @theId))
		begin
			RAISERROR ('Diagram does not exist or you do not have permission.', 16, 1)
			return -3
		end
	
		delete from dbo.sysdiagrams where diagram_id = @DiagId;
	
		return 0;
	END
	

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go


	ALTER PROCEDURE [dbo].[sp_helpdiagrams]
	(
		@diagramname sysname = NULL,
		@owner_id int = NULL
	)
	WITH EXECUTE AS N'dbo'
	AS
	BEGIN
		DECLARE @user sysname
		DECLARE @dboLogin bit
		EXECUTE AS CALLER;
			SET @user = USER_NAME();
			SET @dboLogin = CONVERT(bit,IS_MEMBER('db_owner'));
		REVERT;
		SELECT
			[Database] = DB_NAME(),
			[Name] = name,
			[ID] = diagram_id,
			[Owner] = USER_NAME(principal_id),
			[OwnerID] = principal_id
		FROM
			sysdiagrams
		WHERE
			(@dboLogin = 1 OR USER_NAME(principal_id) = @user) AND
			(@diagramname IS NULL OR name = @diagramname) AND
			(@owner_id IS NULL OR principal_id = @owner_id)
		ORDER BY
			4, 5, 1
	END
	

 

分享到:
评论

相关推荐

    SqlServer存储过程及调试指南

    SqlServer存储过程及调试指南的知识点如下: 1. 存储过程概念:存储过程是一组为完成特定功能的SQL语句集,这些语句经过编译后存储在数据库中,供用户通过指定存储过程名和参数(如有)来执行。存储过程被称作...

    SQLServer存储过程调用WebService

    [Microsoft.SqlServer.Server.SqlProcedure] public static void CallWebService(SqlString url, SqlString methodName) { // 创建 SOAP 服务客户端 SoapHttpClientProtocol client = new ...

    sqlserver存储过程解密工具

    这就是“sqlserver存储过程解密工具”所解决的问题。 SQL Server存储过程的加密通常是在开发或部署过程中,为了保护知识产权、防止未授权修改或者增加安全性而进行的。然而,在某些情况下,比如接手他人项目、排查...

    SQLServer存储过程中事务的使用方法

    本篇将详细介绍如何在SQL Server存储过程中使用事务。 首先,事务有四个基本特性,即ACID(原子性、一致性、隔离性和持久性): 1. 原子性(Atomicity):事务中的所有操作要么全部完成,要么全部不完成,不会留下...

    SQLserver存储过程异常处理.txt

    SQLserver存储过程异常处理

    sqlserver 存储过程With Encryption加密的解密

    ### SQL Server 存储过程 With Encryption 加密的解密方法 #### 背景与目的 在SQL Server中,为了保护存储过程中的敏感代码或逻辑,可以使用`WITH ENCRYPTION`选项对存储过程进行加密处理。这可以有效防止未经授权...

    SQLServer存储过程转为oracle存储过程的工具

    可以将SQL Server存储过程转为oracle存储过程的工具

    执行Sqlserver存储过程返回DataSet

    ### 执行SQL Server 存储过程并返回DataSet 在软件开发过程中,经常需要与数据库进行交互,其中一种常见的场景就是通过调用存储过程来获取数据并处理这些数据。本篇文章将详细探讨如何在C#中执行SQL Server的存储...

    sqlServer存储过程

    详细描述SqlServer存储过程,从认识、创建到原理和写法

    SQL Server存储过程解密工具

    SQL Server存储过程是数据库管理系统中一个非常重要的组成部分,它允许程序员和DBA编写一组复杂的SQL语句,封装成一个可重用的模块。在某些情况下,为了保护代码不被未经授权的用户查看或修改,开发人员可能会选择对...

    Sql Server 存储过程的导出导入.doc

    在SQL Server中,存储过程是一种预编译的SQL语句集合,它允许开发人员封装一组复杂的操作,并在需要时重复调用。存储过程对于数据库管理、数据处理和性能优化具有重要意义。本文主要介绍如何在SQL Server中导出和...

    SQLServer存储过程

    SQLServer存储过程(stored procedure)从入门到精通 内附详细实例

    SQL server存储过程习题,SQL触发器习题.rar

    在SQL Server数据库管理系统中,存储过程和触发器是两种非常重要的数据库编程元素,它们对于数据库设计和数据管理具有深远的影响。下面将详细讲解这两个概念及其相关的知识点。 **SQL存储过程**: 1. **定义**:SQL...

    SqlServer存储过程解密工具(dbForge SQL Decryptor 3.1.24)

    亲测SqlServer存储过程解密工具(dbForge SQL Decryptor 3.1.24) 支持sql2000、2005、2008(R2)、2012、2014、2016、2017的存储过程的解密; 程序运行需要 .NET Framework 4.5.2 or higher installed

    SQLSERVER 存储过程 语法

    本文将深入解析SQL Server存储过程的创建、参数传递、事务管理、条件判断以及游标使用的语法细节。 #### 创建存储过程 存储过程的基本语法如下: ```sql CREATE PROCEDURE 存储过程名称 @参数1 数据类型, @参数...

    SQLSERVER存储过程例子

    以下是针对"SQLSERVER存储过程例子"的详细解释。 1. **存储过程的概念**: 存储过程是一组为了完成特定功能的SQL语句,这些语句被组合在一起并保存在数据库中,用户可以通过调用存储过程的名字来执行这些语句。...

    java调用sqlserver存储过程.pdf

    "Java 调用 SQL Server 存储过程" Java 调用 SQL Server 存储过程是指在 Java 应用程序中调用 SQL Server 数据库中的存储过程,以实现数据的增删改查等操作。下面是关于 Java 调用 SQL Server 存储过程的知识点: ...

    SQLServer存储过程在系统开发中的应用

    ### SQL Server 存储过程在系统开发中的应用 #### 概述 在现代数据库系统开发过程中,SQL Server 存储过程被广泛应用于提高系统性能、简化应用程序开发以及增强安全性等方面。存储过程是一种预编译的SQL脚本,它...

    SQL Server 存储过程与实例

    以下是关于SQL Server存储过程的详细说明: 1. **存储过程的概念** 存储过程Procedure是一系列SQL语句的集合,它们在数据库中以编译好的形式存储,当需要执行时,只需要调用存储过程的名称并传入相应的参数。存储...

    如何编写SQL Server存储过程的详尽学习资料

    至于"SQLServer2000存储过程与XML编程第2版code"这个文件,它可能包含了一些针对SQL Server 2000的存储过程示例代码和XML相关的实践。XML在SQL Server中用于数据交换和存储,学习如何在存储过程中使用XML数据类型和...

Global site tag (gtag.js) - Google Analytics