Subject Re: [firebird-support] Re: slow "where 1=0"
Author Martijn Tonies
> > Firebird didn't infer that 1 = 0 is false for all rows
>
> Well, I sounds to me that he have to ... 1=0 if false in every place in
> of the world <g>

Constants against constants aren't checked, it's a silly query :-)

>
> > You'd better write the query as:
> > select first 0 * from TABLE;
> >
>
> The poblem is that this sintaxis is not interpreted in all the engines.
>

How about:

WHERE <idcolumn> = -1

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com