take可以这样实习,没问题。
Code
SELECT t0.EmployeeID, t0.LastName, t0.FirstName, t0.Title, t0.TitleOfCourtesy, t0.BirthDate, t0.HireDate, t0.Address, t0.City, t0.Region, t0.PostalCode, t0.Country, t0.HomePhone, t0.Extension, t0.Photo, t0.Notes, t0.ReportsTo, t0.PhotoPath
FROM Employees t0
WHERE (ROWNUM) < :p0
ORDER BY t0.HireDate
-- :p0: Input Int32 (Size = 0; Prec = 0; Scale = 0) [5]
-- Context: OracleProvider(Sql2005) Model: AttributedMetaModel Build: 3.5.21022.8
但是Skip这样实现,怎么就不行呢?语法没有问题,但是读不到数据。郁闷呀~~~~~
Code
SELECT t0.ProductID, t0.ProductName, t0.SupplierID, t0.CategoryID, t0.QuantityPerUnit, t0.UnitPrice, t0.UnitsInStock, t0.UnitsOnOrder, t0.ReorderLevel, t0.Discontinued
FROM Products t0
WHERE (ROWNUM) >= :p0
ORDER BY t0.UnitPrice DESC
-- :p0: Input Int32 (Size = 0; Prec = 0; Scale = 0) [10]
-- Context: OracleProvider(Sql2005) Model: AttributedMetaModel Build: 3.5.21022.8
从语法上看完全没问题,是不是因为skip太多了导致没有数据读了呢