首页 新闻 搜索 专区 学院

再次求助,Oracle的take、Skip。

0
悬赏园豆:10 [已关闭问题] 关闭于 2008-10-01 23:58

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
麦舒的主页 麦舒 | 菜鸟二级 | 园豆:452
提问于:2008-10-01 18:49
< >
分享
所有回答(1)
0

从语法上看完全没问题,是不是因为skip太多了导致没有数据读了呢

Gray Zhang | 园豆:17610 (专家六级) | 2008-10-01 20:12
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册