随笔分类 - SQL SERVER
剽窃的小经验
摘要:https://stackoverflow.com/questions/695752/how-to-design-a-product-table-for-many-kinds-of-product-where-each-product-has-m You have at least these fi
阅读全文
摘要:http://blog.csdn.net/roy_88/archive/2007/12/03/1914264.aspx[代码]
阅读全文
摘要:http://community.csdn.net/Expert/topic/5650/5650489.xml?temp=.7952539 --先创建一个数据库 database --1.创建数据库主密钥 use database Create master key ENCRYPTION by password = 'p@ssw0rd' --如果是强密码策略的系统需要写成强密码 --2.创建存放加...
阅读全文
摘要:sp_recompile 使存储过程和触发器在下次运行时重新编译。 sp_refreshview 刷新指定视图的元数据。由于视图所依赖的基础对象的更改,视图的持久元数据会过期。
阅读全文
摘要:xp_sqlagent_enum_jobs是微软未公开的存储过程,用于取得作业的相关信息,在自己进行调度处理多作业时,用它来判断作业的执行情况再合适不过了。 create table #help_job( job_id UNIQUEIDENTIFIER NOT NULL, last_run_date INT NOT NULL, last_run_time INT NOT NULL...
阅读全文
摘要:1if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_decrypt]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) 2drop procedure [dbo].[sp_decrypt] 3GO 4 5/**//*--破解函数,过程,触发器,...
阅读全文
摘要:转自CSDN--查询表结构信息SELECT 表名=case when a.colorder=1 then d.name else '' end,表说明=case when a.colorder=1 then isnull(f.value,'') else '' end,字段序号=a.colorder,字段名=a.name,标识=case when COLUMNPROPERTY( a.id,a.na...
阅读全文
摘要:转自:http://community.csdn.net/Expert/topic/3146/3146639.xml?temp=.5080072if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[f_GB2BIG]') and xtype in (N'FN', N'IF', N'TF'))drop functi...
阅读全文
摘要:转自:http://community.csdn.net/Expert/topic/3151/3151832.xml?temp=.5798609if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[p_stuff]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)drop...
阅读全文
摘要:转自:http://community.csdn.net/Expert/topic/3271/3271317.xml?temp=.3221704if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[p_GetPassword]') and OBJECTPROPERTY(id, N'IsProcedure') =...
阅读全文
摘要:转自:http://community.csdn.net/Expert/topic/3295/3295983.xml?temp=.7020227 最近搜索了一下全文检索,发现了一些问题,现在总结如下: 全文索引和查询概念(摘自SQL 联机帮助) 全文索引、查询和同步化最主要的设计要求是,在注册进行全文检索的所有表上都有一个唯一的全文键列(或者单列主键)。全文索引对使用的重要字及其所在位置进行跟踪...
阅读全文
浙公网安备 33010602011771号