z*y 发帖数: 1311 | 1 I want to fetch the first record from a table. but I don't know
how to do it by using select. Coule anyone help me? thanks. | D****N 发帖数: 430 | 2 to get first record sorted on someindex you can
use:
SELECT TOP 1
something, something, something
FROM
sometable
ORDER BY
someindex
【在 z*y 的大作中提到】 : I want to fetch the first record from a table. but I don't know : how to do it by using select. Coule anyone help me? thanks.
| z*y 发帖数: 1311 | 3
not working, what version you are using? I'm using oracle sql.
【在 D****N 的大作中提到】 : to get first record sorted on someindex you can : use: : SELECT TOP 1 : something, something, something : FROM : sometable : ORDER BY : someindex
| j****s 发帖数: 271 | 4 select column
from tab
where your_conditions and ROWNUM = 1;
【在 z*y 的大作中提到】 : : not working, what version you are using? I'm using oracle sql.
|
|