文章分类 - 处理数据库
摘要:用到了函数GO/****** 对象: UserDefinedFunction [dbo].[GetChild] 脚本日期: 10/07/2014 10:41:02 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE funct...
阅读全文
摘要:select * from Users where charindex(','+ltrim(id), (select ','+attendlist from MembersUser where name='mudan' ) )>0
阅读全文
摘要:系统自带的存储过程SP_SPACEUSEDEXEC SP_SPACEUSED 'dbo.selltest'
阅读全文
摘要:set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgo--TOP n 实现的通用分页存储过程(转自邹建)create PROC [dbo].[sp_PageView]@tbname sysname, --要分页显示的表名@Field...
阅读全文
摘要:--判断临时表是否存在if exists (select * from tempdb.dbo.sysobjects where id = object_id(N'tempdb..#TEMP_TBL') and type='U')begintruncate table #TEMP_TBLendELSE...
阅读全文
摘要:CREATEPROCEDUREDInstitute_Insert@InstituteNOnvarchar(6),@InstituteNamenvarchar(40)ASdeclare@returnint,@countintif(ltrim(rtrim(@InstituteName))=''orltr...
阅读全文
摘要:declare @result nvarchar(80)--用来处理结果的变量begin--声明一个游标 Declare curStudentFee Cursor for SELECT convert(bigint,[学籍号]) FROM OPENROWSET('MICROSOFT.JET.OLE...
阅读全文
摘要:错误描述:SQL Server阻止了对组件‘xp_cmdshell’的过程‘sys.xp_cmdshell’的访问。因为此组件已作为此服务嚣安全配置的一部分而被关闭。系统管理员可以通过使用sp_configure启用‘xp_cmdshell’。有关启用‘xp_cmdshell’的详细信息,请参阅sQ...
阅读全文
摘要:select *,Row_Number() OVER (ORDER BY tkid) as row from dbo.tb_tk where parId =9
阅读全文
摘要:set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go--分割字符函数 ALTER Function [dbo].[f_Split](@Sql varchar(2000),@Splits varchar(10)) returns @temp Table (temp...
阅读全文
浙公网安备 33010602011771号