随笔分类 -  SQL SERVER

摘要:set identity_insert [库名].[dbo].[表名] on-----关闭增长SQL语句(Insert into)set identity_insert [库名].[dbo].[表名] off----开启增长 阅读全文
posted @ 2011-11-21 21:36 Silence-01 阅读(156) 评论(0) 推荐(0)
摘要:begin transactionSQL语句commit transaction 阅读全文
posted @ 2011-09-11 00:19 Silence-01 阅读(154) 评论(0) 推荐(0)
摘要:exec spPage @pageSize=13,@pageIndex=4if object_id('spPage')is not null drop proc spPagegoCREATE PROCEDURE spPage(@pageSize int, ----每页显示的记录个数@pageIndex int ----要显示哪一页的记录)ASDECLARE @Counts INTDECLARE @pageUp INT DECLARE @pageDown INT--获得总记录数select @Counts=rows from sysindexes where id = objec 阅读全文
posted @ 2011-05-26 16:31 Silence-01 阅读(112) 评论(0) 推荐(0)
摘要:select @count=rows from sysindexes where id = object_id('Ip') and indid in (0,1) 阅读全文
posted @ 2011-05-26 09:45 Silence-01 阅读(128) 评论(0) 推荐(0)