Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Question Unanswered: Command to view particular Record

    Is there a command synatx to see the paricular table row in Sybase. For an example I have a table called "customer" and it is having 200 entries.

    1) What would be the command to see the data of 100th record?

    2) What would be the command to see the last record? (May be using count (*) ??)

  2. #2
    Join Date
    Nov 2002
    Posts
    207
    One option is to use set rowcount command, but then you will see all the rows from 1 to 100. Other option is using cursors.

    Cheers!
    Manjeet

  3. #3
    Join Date
    Jun 2003
    Posts
    140

    Re: Command to view particular Record

    There is no command to return Nth record from a table in Sybase.
    You can use identiy to auto generate the nos but there it may have
    gaps in numbers over a period of time due to many reasons.

    For last record , you can use set rowcount on and order by desc
    in your SELECT queries if you have clustered index on a column and
    if u order by desc to that column

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •