Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Boris Niyazov — — source: Informix-list mailing list archive (1991-1998)
I do not know what is the criteria for the set , but for example fist 50
rows with smallest rowids:
select * from tab1 a
where 50 > (select count(*) from tab1 b
where a.rowid < b.rowid)
For sufficient large tables it's gonna take a while :-)
Boris Niyazov
Programmer/DBA
IT Department , Columbia Law School
>How do I retrieve a set number of rows in a SQL select.
>
>If my select is something like:
>select * from tab1 where x = y.>
>how do I retrieve only the first 50 rows.>
>
>-Toby Denbow
>tdenbow@mathworks.com
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.