Re: rownum?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Steve Kass (skass_at_drew.edu)
Date: 11/16/04


Date: Tue, 16 Nov 2004 17:59:43 -0500

No. SQL Server does have a proprietary TOP operator, which might help.
I'm not sure what rownum <= 10 means, but if you want the first 10 rows
of a table in order of some particular set of columns, you can ask for

SELECT TOP 10 columnA, columnB, ...
FROM T
ORDER BY thisColumn, thatColumn

Steve Kass
Drew University

JProk wrote:

>Pardon the simple question....
>
>
>does transact-sql have an equivalent of rownum in oracle?
>
>Is there an idea of a rownumber?
>
>ie.
>
>select * from table where rownum <= 10
>
>
>thanks
>
>
>
>
>



Relevant Pages

  • ODBC to Oracle 64bit missing rows
    ... I am on SQL Server 2005, ... I am trying to connect to an Oracle server, ... get errors like, "unexpected catastrophic error", which would require me to ... rownum < 200') ...
    (microsoft.public.sqlserver.connect)
  • Re: How To Return A "Range Of Rows"??
    ... FROM CTE ... WHERE rownum BETWEEN @first AND @last ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Remove neighbouring duplicates
    ... Since you did not say which version of SQL Server you are using, ... WITH numbered_items (rownum, symbol, position, qty, price, date) ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: convert query to DLinq
    ... That is not C# neither Net related, but MS SQL Server 2005 has a Row_Numberpredefined function: ... FROM OVER as rowNum, ... I need to retrieve specific row number from possibly large server table in database. ...
    (microsoft.public.dotnet.languages.csharp)
  • rownum?
    ... Pardon the simple question.... ... does transact-sql have an equivalent of rownum in oracle? ...
    (microsoft.public.sqlserver.programming)