DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Show record number in sqlplus return set

  1. #1
    Join Date
    Apr 2002
    Posts
    73
    Have any ways I can get sequence ( record number) when I run sqlplus?

    For example, there is a table called test, there are 5 records in test table:
    aa
    bb
    cc
    dd
    ee
    Instead of showing the contents of the record, I like to have a sequence number associate with each row.
    1 aa
    2 bb
    3 cc
    4 dd
    5 ee


  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    SQL*PLus has no ability to show record numbers, you'll have to do it in your query:

    SELECT ROWNUM, test.* FROM test;
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

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


Click Here to Expand Forum to Full Width