Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!mtxinu!sybase!shanti.sybase.com!laura From: laura@shanti.sybase.com Newsgroups: comp.databases Subject: re:selecting 10 oldest ages Message-ID: <7192@sybase.sybase.com> Date: 22 Nov 89 20:13:44 GMT Sender: news@sybase.sybase.com Reply-To: laura@shanti.sybase.com () Distribution: usa Organization: Sybase, Inc. Lines: 17 >hemphill@csc000.csc.ti.com (Charles Hemphill) writes: >> List the 10 oldest employees. > select name, birthdate > from employee > order by birthdate desc >and pipe the result through "head -10"? >Otherwise, there's no way to set a limit in SQL. In the Sybase SQL Server, you can use a command, SET ROWCOUNT 10 prior to the select. This will give the desired effect, with the benefit that the limit is set at the server end, not in the front end; the extra rows are never even selected or transfered.