Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!uupsi!sunic!maxim!prc From: prc@erbe.se (Robert Claeson) Newsgroups: comp.databases Subject: Re: SELECT only x number of items Keywords: SELECT SQL Message-ID: <1860@hulda.erbe.se> Date: 18 Oct 90 20:29:15 GMT References: <5@unigold.UUCP> <2796@ns-mx.uiowa.edu> Organization: ERBE DATA AB, Jarfalla, Sweden Lines: 17 In a recent article broy@vaxa.weeg.uiowa.edu writes: >Not being familiar with Ingres I can only vouch for what would work in Oracle >SQL. Perhaps Ingres can use the ROWNUM pseudo-column that Oracle uses? > >Select * from table_name where rownum < 6; > >Note that rownum is assigned before the rows are ordered by any ORDER BY clause. In Ingres, retreiving a limited number of rows is doable with, among others, database procedures. -- Robert Claeson |Reasonable mailers: rclaeson@erbe.se ERBE DATA AB | Dumb mailers: rclaeson%erbe.se@sunet.se | Perverse mailers: rclaeson%erbe.se@encore.com These opinions reflect my personal views and not those of my employer.