how to find the previous record of the table

oracle India
  • 14 years ago

    In a table i have to find the previous(only one) record of an employee

    i have 200 records in my table .but i know 150th record details.i would like to find the 149th record


  • 14 years ago

    Could you explain more of what you want? Could you place a littler example? And the table schema.

  • 14 years ago
    Hi Sundaraj
     Try the follwoing method.

     select * from (select * from t1 order by x )  where rownum =149;

    I hope this method will solve ur problem

    Good LUck

    Hari K......

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint Exupéry