🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #562

How can we select row number in SQL Query ?

#562
From: Sunil.P.Thomas
Date: Fri, 06 Aug 2004 10:29
14 lines
1353 bytes
Hi ,
       Excuse me for asking an SQL related question in this newsgroup.
       I have a query like this ,
            SELECT Usr_Name_C , Usr_Role_N FROM Adm_User_Mst
       i want an additional column called SerialNumber like this
          SELECT SerialNumber  , Usr_Name_C , Usr_Role_N FROM Adm_User_Mst
      but that number should be 1 for first record ,  2 for second record
and so on.
      How this query should be written  .

     Thanks in advance.

      Regards
        Sunil
Technical Details
Message-ID: <41135c6e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,11a7bd6d913cd293,start
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Sunil.P.Thomas" <sunil@netlinkindia.com>
Newsgroups: borland.public.csharpbuilder.language.csharp
Subject: How can we select row number in SQL Query ?
Date: Fri, 6 Aug 2004 15:59:41 +0530
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 202.144.28.122
Message-ID: <41135c6e@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1091787886 202.144.28.122 (6 Aug 2004 03:24:46 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail