1
A
回答
1
试试这个:
declare @x int
set @x = 3
select top 1
from (select top @x from table order by 1 desc) xx
0
$third_element = mysql_result(mysql_query("SELECT prices FROM the_table WHERE prices = '3'"), 0);
,其选择的元素,但我不知道你为什么会想那样做,除非你有另一行从等,其中other_row =“东西”,那么你会在抵达选择它3.
0
是有可能 这里是你的答案的解决方案尝试。
create table prices
(
price int
)
insert into prices values (1)
insert into prices values (5)
insert into prices values (3)
insert into prices values (8)
insert into prices values (2)
insert into prices values (8)
select x.* from
(
select ROW_NUMBER()over(order by price) as RowNumber,price
from prices
)x
where x.RowNumber=3
相关问题
- 1. LINQ - 我怎样才能在一个查询
- 2. Symfony的1.4 - 我怎样才能查询
- 3. 我怎样才能把这个写成一个查询?
- 4. 我怎样才能加入这个2个MySQL查询一起
- 5. 我怎样才能在一个列表
- 6. 我怎样才能在一个空间{{}}
- 7. 我怎样才能在一个NotSerializableException
- 8. 我怎样才能在一个XML Schema
- 9. 我怎样才能在一个div
- 10. 我怎样才能让两个查询一次MongoDB中
- 11. 我怎样才能使用一个pgsql查询与JS
- 12. 我怎样才能做一个查询选择嵌套?
- 13. 我怎样才能构建一个SQL查询以下结果?
- 14. 我怎样才能更改一个SQL查询linq 2 nhibernate?
- 15. 我怎样才能把一个SQL查询扔进Viewbag
- 16. 我怎样才能在laravel做到这一点查询
- 17. 我怎样才能返回一个SQL SELECT到SQL变量
- 18. 我怎样才能做一个SELECT与IF子句
- 19. 访问 - 我怎样才能在两个查询
- 20. 我怎样才能把这个自定义Linq查询查看?
- 21. 我怎样才能让这个MySQL查询2个表
- 22. 我怎样才能
- 23. 我怎样才能
- 24. 我怎样才能
- 25. 我怎样才能
- 26. 我怎样才能重用一个双
- 27. 我怎样才能创建一个UIImageView
- 28. 我怎样才能得到一个TD
- 29. 我怎样才能纹理一个GL_TRIANGLE_STRIP?
- 30. 我怎样才能得到一个RejectedExecutionException