随笔分类 -  SQLServer 2005

TSQL笔记1
摘要:truncatetable<tablename> 运行后 表中的 标识列会 初始化 delete 没这功能 declare@dayidintset@dayid=datepart(y,getdate())declare@yearintset@year=datepart(year,getdate())insertintotop_days(musicid,hits,year,dayid,so... 阅读全文

posted @ 2007-06-27 17:22 随风.Net 阅读(254) 评论(0) 推荐(0)

sql 查寻 耗时统计
摘要:declare @t1 datetime;set @t1 =getdate(); select datediff(ms,@t1,getdate()); 阅读全文

posted @ 2007-06-19 16:21 随风.Net 阅读(338) 评论(0) 推荐(0)

SQL TOP N 分组统计
摘要:--分组统计 select a.emp_id,b.emp_name,a.dept_no,a.bb_no,a.xh,a.idno,a.emp_no,a.beg_date,a.over_date,a.basesal from HRSys.dbo.EmpbaseSal a left join HRSys.dbo.Employee b on a.emp_id=b.emp_idwhere basesa... 阅读全文

posted @ 2007-06-19 15:42 随风.Net 阅读(1190) 评论(1) 推荐(0)

用存储过程清除数据库日志
摘要:搞个SP来清日志也比较爽 呵呵 set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO -- ============================================= -- powered by donets.cnblogs.com -- ============================================= CREA... 阅读全文

posted @ 2007-04-14 11:32 随风.Net 阅读(315) 评论(0) 推荐(0)

asp.net sql 远程链接
摘要:Data Source=[,PORT];Initial Catalog=;Persist Security Info=True;User ID=;Password= mysql的端口前用 “:” 当然名字就不一样了 阅读全文

posted @ 2007-04-05 18:26 随风.Net 阅读(258) 评论(2) 推荐(0)

导航