摘要:
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( 阅读全文
摘要:
(这些新功能确实不错,特地找了一篇比较详细介绍.)今天整理了一下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 阅读全文