Re: How to limit rows selected?
Posted in 1997
Topics: SQL Development & Query Writing
Glen Norman wrote: > Arun Jamwal wrote: > > > > Hi everyone! > > > > What's the optimum way to extract say, 50 , rows from > > say, 100 customer data tables - the table names are not > > known until runtime, ie, a separate table contains the > > names of these 100 customer data tables? Each customer > > data table may contain 1000+ records/rows. > > > > The 50 rows fetched/selected must be the ones which have > > say, the lowest age among all the records in 100 customer > > data tables. > > > > Thanks in advance. > > > > Jamwal. > > Email: jamwal@quality.com > One way that may work for you is to use the statement "set rowcount > 50" > just before your select statement. Your select statement will do the > rest of the work. The select statement can have an order by or any > other clauses it needs. The rowcount limit is applied after > everything > else. set rowcount 50 ?????? Is it "Informix" command ?