Re: Alternative for TOP

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 08/03/04


Date: Tue, 3 Aug 2004 10:11:06 +0200

One option is SET ROWCOUNT

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"student" <agarwalp@eeism.com> wrote in message news:elD5A8SeEHA.2376@tk2msftngp13.phx.gbl...
> Hi,
>
> Is there any alternative for TOP clause apart from Cursors. I mean suppose i
> want to list down the top three values from a resultset, how do i do without
> TOP Clause.
>
> Thanks
>
>


Relevant Pages

  • Re: Inserting line breaks ( ) in SQL DB
    ... > clause you can use so you can keep your \n's. ... > Tibor Karaszi, SQL Server MVP ... >> Thanks, Dan. ...
    (microsoft.public.sqlserver.programming)
  • Re: (Fwd) DBIs method for reading [row x,field y]
    ... result-set so this will use that amount of memory up but given you are already doing this I guess that won't bother you (unless Pg uses cursors to navigate to the required row). ... PostgreSQL will often randomly order result sets that do not have an ... an order by clause - often random results and perfomance instigate a complete redesign soon after. ...
    (perl.dbi.users)
  • Re: SELECT COUNT(*)
    ... It just says return this value no matter what. ... Once you add the WHERE clause, you are not saying 'no matter what', you are ... > Wayne Snyder, MCDBA, SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: update and large table
    ... I also note there is no WHERE clause, so you will be updating rows (at a ... cost) even if the new values are the same as the existing values. ... SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: SELECT INTO AND ORDER BY?
    ... > the ORDER BY clause: ... > In fact you can't control the order in which IDENTITY values are assigned ... > David Portas ... > SQL Server MVP ...
    (microsoft.public.sqlserver.programming)