| SQL - Questions and Answers Have a SQL question? Post it here. First do a search to see if someone hasn't already answered it. |
|
|||
|
In most databases, the order of rows in the table are not required to be consistent from one time to another unless you use the ORDER BY statement. Even though it appears that you always see the same order when you SELECT * FROM tbl, you cannot rely on that as new versions of the database come out.
So the answer to that question depends on what you order by. If you have a customer table ordered by last name, what does the "third row" tell you? Please explain a scenario where getting the third row would be required. |
|
|||
|
You can use this and can select whichever row you want to select:
select * from (select rownum r,col_1,col_2,col_3,col_4 from table_name) t where t.r='&z' Last edited by deepak garg : 12-05-2007 at 11:05 AM. |
![]() |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|