[thelist] DB "Limit" Command Question

Luther, Ron Ron.Luther at hp.com
Thu Apr 16 13:18:36 CDT 2009

Hi Gang,

Okay, I'm pretty sure that if I run a query containing both a clause to limit output to 20 records AND a clause to sort or order the data in some way that the query will execute through the entire table (data model) and then limit the output sent back to the viewport to the 20 records I specified.

But what if I don't? 

What if I run a 'select field1, field2, field3 from tableA' that contains a 'limit output to 20 records" clause?

Does it run through the whole table and then return 20 records?  Or does it stop executing at 20 records and return?


[Yeah, the answer might very well vary by DBMS.  Anybody got answers for any popular DBs?]

More information about the thelist mailing list