public class Customer { public String CustomerID { get;セット; } public String CompanyName { get;セット; } public String ContactName { get;set;} public String ContactTitle { get; set;}セット; } パブリック文字列アドレス { get;セット; } public String City { get;セット; SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO Create PROCEDURE SearchCustomerByName @name nvarchar(30) 、 @pageIndex int、 @pageSize int AS BEGIN SET NOCOUNT ON; select t.CustomerID,t.CompanyName,t.ContactName,t.ContactTitle,t.Address,t.City from ( select Row_Number() over (order by CustomerID) AS RowNum,* from Customers where ContactName like '%' @name '%' ) t where t.RowNum between @pageIndex*10 1 and (@pageIndex 1)*10 select count(*) from Customers where ContactName like '%' @name '%' END GO