博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年3月24日

摘要: 触发器点滴判断操作类型if exists (select 1 from inserted) and exists (select 1 from deleted)begin -- updateendif exists (select 1 from inserted) and not exists (select 1 from deleted)begin --insertend 阅读全文

posted @ 2012-03-24 12:27 linFen 阅读(323) 评论(0) 推荐(0) 编辑

摘要: 方法一:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1 select* 2 from sysobjects o, syscomments s 3 where o.id = s.id 4 andtextlike'%yyao%' 5 and o.xtype ='P'复制代码将yyao替换成自己要查找的文本方法二:Code highlighting produced by Actipro CodeHighligh 阅读全文

posted @ 2012-03-24 12:26 linFen 阅读(1940) 评论(0) 推荐(0) 编辑

摘要: SQL Server FOR XML PATH 语句的应用在SQL Server中利用 FOR XML PATH 语句能够把查询的数据生成XML数据,下面是它的一些应用示例。?12345DECLARE @TempTable table(UserID int , UserName nvarchar(50)); insert into @TempTable (UserID,UserName) values (1,'a') insert into @TempTable (UserID,UserName) values (2,'b') select UserID,Use 阅读全文

posted @ 2012-03-24 12:15 linFen 阅读(370) 评论(0) 推荐(0) 编辑