摘要: IfDataGrid1.Items.Count=1AndDataGrid1.CurrentPageIndex>0Then DataGrid1.CurrentPageIndex=DataGrid1.CurrentPageIndex-1 EndIf 阅读全文
posted @ 2005-04-27 12:22 魔豆 阅读(392) 评论(0) 推荐(0) 编辑
摘要: execsp_renamedb'old_name','new_name' 阅读全文
posted @ 2005-04-27 12:19 魔豆 阅读(1135) 评论(1) 推荐(0) 编辑
摘要: SETNOCOUNTON; insertintotable1()values(''); select@@IDENTITY; SETNOCOUNTOFF; 阅读全文
posted @ 2005-04-27 12:16 魔豆 阅读(666) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2005-04-27 12:12 魔豆 阅读(810) 评论(0) 推荐(0) 编辑
摘要: Regex.Replace(str,"","") 阅读全文
posted @ 2005-04-27 12:09 魔豆 阅读(847) 评论(0) 推荐(0) 编辑
摘要: FunctionRegChinese(str) DimregEx,retVal SetregEx=NewRegExp regEx.Pattern="^[^\u0000-\u00FF]*$" regEx.IgnoreCase=False retVal=regEx.Test(str) IfretValThen ... 阅读全文
posted @ 2005-04-27 12:06 魔豆 阅读(511) 评论(0) 推荐(0) 编辑
摘要: select * from TableName order by newid() 阅读全文
posted @ 2005-04-27 11:48 魔豆 阅读(523) 评论(1) 推荐(0) 编辑
摘要: begin transaction …… commit transaction 阅读全文
posted @ 2005-04-27 11:46 魔豆 阅读(919) 评论(0) 推荐(0) 编辑
摘要: select Min(VisitTime),count(*) as Num from online group by datediff(day,VisitTime,getdate()) 阅读全文
posted @ 2005-04-27 11:44 魔豆 阅读(2662) 评论(1) 推荐(1) 编辑
摘要: convert(varchar(10),date1,120) 阅读全文
posted @ 2005-04-27 11:43 魔豆 阅读(1206) 评论(0) 推荐(0) 编辑
摘要: 方法一: sp_MShelpcolumns '表名' 方法二: sp_help '表名' 方法三: select * from information_schema.columns where table_name='表名' 三种方法查出来的效果不一样,可以根据情况选择使用. 阅读全文
posted @ 2005-04-27 11:40 魔豆 阅读(477) 评论(0) 推荐(0) 编辑
摘要: select datepart(weekday,getdate()) 1为星期日,2为星期一,3为星期二,…… 阅读全文
posted @ 2005-04-27 11:37 魔豆 阅读(1380) 评论(0) 推荐(0) 编辑
摘要: declare @dt datetime set @dt=getdate() select 32-Day(@dt+(32-Day(@dt))) 阅读全文
posted @ 2005-04-27 11:35 魔豆 阅读(780) 评论(0) 推荐(0) 编辑
摘要: select identity(int,1,1) as id,username into #temp from table1 group by username select * from #temp 阅读全文
posted @ 2005-04-27 11:32 魔豆 阅读(787) 评论(0) 推荐(0) 编辑
摘要: DBCC checkident(tablename,RESEED,1) 阅读全文
posted @ 2005-04-27 11:31 魔豆 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 下面的示例将登录用户的密码由ok改为coffee EXEC sp_password 'ok','coffee' 阅读全文
posted @ 2005-04-27 11:29 魔豆 阅读(443) 评论(0) 推荐(0) 编辑
摘要: 下例将表customers重命名为custs EXEC sp_rename 'customers','custs' 阅读全文
posted @ 2005-04-27 11:27 魔豆 阅读(14976) 评论(0) 推荐(1) 编辑
摘要: 代码如下: 阅读全文
posted @ 2005-04-27 11:21 魔豆 阅读(727) 评论(0) 推荐(0) 编辑