Unix Technical Forum

newbie: Limit rows returned in a select

This is a discussion on newbie: Limit rows returned in a select within the Sybase forums, part of the Database Server Software category; --> Is there a way to limit the number of rows returned in a select statement? I thought it was ...


Go Back   Unix Technical Forum > Database Server Software > Sybase

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 03:52 PM
Alison
 
Posts: n/a
Default newbie: Limit rows returned in a select

Is there a way to limit the number of rows returned in a select statement?

I thought it was TOP(5) but that does not work..

Thanks
Alley
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 03:52 PM
Michael Peppler
 
Posts: n/a
Default Re: newbie: Limit rows returned in a select

On Thu, 28 Aug 2003 06:42:55 -0700, Alison wrote:

> Is there a way to limit the number of rows returned in a select statement?
>
> I thought it was TOP(5) but that does not work..


Look up the "SET ROWCOUNT xxx" command in the ASE reference manual.

Michael
--
Michael Peppler Data Migrations, Inc.
mpeppler@peppler.org http://www.mbay.net/~mpeppler
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.mbay.net/~mpeppler/resume.html

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 03:52 PM
Klint Gore
 
Posts: n/a
Default Re: newbie: Limit rows returned in a select

In article <41a170d2.0308280542.72430ca4@posting.google.com >,
alison.craine@atsc.army.mil says...
>
>Is there a way to limit the number of rows returned in a select statement?
>
>I thought it was TOP(5) but that does not work..


in ASA it's

select top 5 * from table

klint.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:24 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com