上一页 1 ··· 4 5 6 7 8 9 10 下一页
摘要: --阻塞 /*********************************************************************************************************************** 阻塞:其中一个事务阻塞,其它事务等... 阅读全文
posted @ 2008-07-21 01:21 正牌风哥 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 1、提示加載服務("安装程序配置服务器失败")出錯時,通常是由於注冊表信息或安裝文件夾SQL文件沒有完全刪除造成的 A、刪除注冊表(XP系統為例) Windows Registry Editor Version 5.00 [-HKEY_LOCAL_MACHINE/SOFTWARE/Mic... 阅读全文
posted @ 2008-07-04 13:33 正牌风哥 阅读(126) 评论(0) 推荐(0) 编辑
摘要: --以05環境實現方法 --2000同樣臨時表實現方法相同!! 动态语句语法同sp_executesql相同 --以sp開頭在master生成,其它庫可能直接調用 use master go if object_id('Sp_ExecSQL') is not null drop proc ... 阅读全文
posted @ 2008-06-19 11:13 正牌风哥 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 用函數生成腳本:--自动生成数据库的清空脚本(SQL05環境)use Test--指定數據庫goif object_id('F_Clear','TF') is not null drop function F_Cleargocreate Function F_Clear()returns @T t... 阅读全文
posted @ 2008-05-21 22:57 正牌风哥 阅读(129) 评论(0) 推荐(0) 编辑
摘要: use testgoif object_id('Tempdb..#T') is not null drop table #Tcreate table #T(ID int,Name nvarchar(100),parentID int)insert #T select 1,'A',0inse... 阅读全文
posted @ 2008-05-16 13:46 正牌风哥 阅读(133) 评论(0) 推荐(0) 编辑
摘要: --2005化解32层递归限制,2000可用循环替代或用(游标while加break递归自己用一个变量传参)if object_id('Tree','U') is not null drop table [Tree]go CREATE TABLE [dbo].[Tree]( [ID]... 阅读全文
posted @ 2008-01-15 19:40 正牌风哥 阅读(135) 评论(0) 推荐(0) 编辑
摘要: use Roy --數據庫go--2005實現數據庫表字段屬性統計(2000里的系統表sysproperties描述表不存在,2005里用sys.extended_properties視圖替代)select [表名]=c.Name, [表说明]=isnull(f.[value]... 阅读全文
posted @ 2007-12-03 18:48 正牌风哥 阅读(100) 评论(0) 推荐(0) 编辑
摘要: use testgo--生成測試臨時表#if not object_id('Tempdb..#')is null drop table #select top 35 [Name]=cast( [Name] as nvarchar(50)) into # from s... 阅读全文
posted @ 2007-11-29 09:14 正牌风哥 阅读(150) 评论(0) 推荐(0) 编辑
摘要: ------十进制转换为十八进制create function F_int18(@num int)returns nvarchar(50)asbeginif @num=0 return '0'declare @s nvarchar(50)set @s=''while @num>0 ... 阅读全文
posted @ 2007-11-13 13:55 正牌风哥 阅读(428) 评论(0) 推荐(0) 编辑
摘要: ---生成测试表Tif exists(select 1 from sysobjects where Name=N'T' and objectProperty(ID,N'IsUserTable')=1) drop table Tgoselect top 5 ID,Name into T fr... 阅读全文
posted @ 2007-11-09 00:24 正牌风哥 阅读(135) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 下一页