摘要: DECLARE @rows_per_page AS INTEGERDECLARE @current_page AS INTEGERDECLARE @total_pages AS INTEGERDECLARE @start_item AS INTEGERDECLARE @items_count AS INTEGER-- 设置每页的行数SET @rows_per_page = 10-- 设置要显示的页号(从1开始)SET @current_page = 3SELECT @total_pages = COUNT(*) / @rows_per_page + 1,@items_count= COUNT( 阅读全文
posted @ 2011-08-17 15:12 K.chaos 阅读(179) 评论(0) 推荐(0) 编辑
摘要: (这些新功能确实不错,特地找了一篇比较详细介绍.)今天整理了一下SQL Server 2005的新增功能,自己学习了以后进行了总结,一共有四个新的排序函数(ROW_NUMBER、RANK、DENSE_RANK 和 NTILE)和三个其他新增功能(TOP表达式,Try...Catch,通用表达式CTE)为了详细进行讲解,这儿建立一张表StuTest:create table stutest(pid int primary key,name varchar(50) not null,age int not null,sex varchar(10) not null,score float not 阅读全文
posted @ 2011-08-17 14:57 K.chaos 阅读(325) 评论(2) 推荐(0) 编辑