Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!usc!sdsu!genbank!ames!coherent!mrspoc!itkin From: itkin@mrspoc.Transact.COM (Steven M. List) Newsgroups: comp.databases Subject: Re: Simple SQL question Keywords: SQL Message-ID: <1989Nov19.200834.266@mrspoc.Transact.COM> Date: 19 Nov 89 20:08:34 GMT References: <98813@ti-csl.csc.ti.com> Reply-To: itkin@guinan.Transact.COM Organization: Transact Software, Inc. Lines: 24 hemphill@csc000.csc.ti.com (Charles Hemphill) writes: >Can the following type of question be answered with an SQL expression? > List the 10 oldest employees. >Basically, I'd like the top N tuples from an ordered table. I don't >want to use embedded SQL. Wouldn't this be something like 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. -- +----------------------------------------------------------------------------+ : Steven List @ Transact Software, Inc. :^>~ : : Chairman, Unify User Group of Northern California : : {apple,coherent,limbo,mips,pyramid,ubvax}!itkin@guinan.Transact.COM :