摘要:
IfDataGrid1.Items.Count=1AndDataGrid1.CurrentPageIndex>0Then DataGrid1.CurrentPageIndex=DataGrid1.CurrentPageIndex-1 EndIf 阅读全文
摘要:
execsp_renamedb'old_name','new_name' 阅读全文
摘要:
SETNOCOUNTON; insertintotable1()values(''); select@@IDENTITY; SETNOCOUNTOFF; 阅读全文
摘要:
阅读全文
摘要:
Regex.Replace(str,"","") 阅读全文
摘要:
FunctionRegChinese(str) DimregEx,retVal SetregEx=NewRegExp regEx.Pattern="^[^\u0000-\u00FF]*$" regEx.IgnoreCase=False retVal=regEx.Test(str) IfretValThen ... 阅读全文
摘要:
select * from TableName order by newid() 阅读全文
摘要:
begin transaction …… commit transaction 阅读全文
摘要:
select Min(VisitTime),count(*) as Num from online group by datediff(day,VisitTime,getdate()) 阅读全文
摘要:
convert(varchar(10),date1,120) 阅读全文
摘要:
方法一: sp_MShelpcolumns '表名' 方法二: sp_help '表名' 方法三: select * from information_schema.columns where table_name='表名' 三种方法查出来的效果不一样,可以根据情况选择使用. 阅读全文
摘要:
select datepart(weekday,getdate()) 1为星期日,2为星期一,3为星期二,…… 阅读全文
摘要:
declare @dt datetime set @dt=getdate() select 32-Day(@dt+(32-Day(@dt))) 阅读全文
摘要:
select identity(int,1,1) as id,username into #temp from table1 group by username select * from #temp 阅读全文
摘要:
DBCC checkident(tablename,RESEED,1) 阅读全文
摘要:
下面的示例将登录用户的密码由ok改为coffee EXEC sp_password 'ok','coffee' 阅读全文
摘要:
下例将表customers重命名为custs EXEC sp_rename 'customers','custs' 阅读全文
摘要:
代码如下: 阅读全文