Equivalent expressions

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Given a primary key field `RecNo` -

Are there any performance reasons to favor one of these two otherwise
equivalant expressions?

    FROM SomeTable;

    SELECT RecNo
    FROM SomeTable
    LIMIT 1;

Just curious.
Thomas Bartkus

Re: Equivalent expressions

Thomas Bartkus wrote:
Quoted text here. Click to load it

I think the performance differences (if any) would be easy enough to
test yourself.
Note though that there are at least a couple of situations  where these
queries are not equivalent: If, for instance, a NULL value was provided
then this would appear at the top of the second query.

Site Timeline