日期:2014-05-18 浏览次数:20501 次
CREATE PROCEDURE [DBO].[Job_SearchPerson] @PIndex int, @PSize int, @ZWP int, @area int AS SELECT TOP (@PSize) [姓名] FROM [TAB1] WHERE ID NOT IN (SELECT TOP (@PSize*(@PIndex-1)) ID FROM [TAB1] ORDER BY [姓名]) ORDER BY [姓名] GO
EXEC( 'ELECT TOP '+@PSize'+ [姓名] FROM [TAB1] WHERE ID NOT IN (SELECT TOP '+@PSize*(@PIndex-1)'+ ID FROM [TAB1] ORDER BY [姓名]) ORDER BY [姓名]' )