Subject | Re: [firebird-support] Re: slow "where 1=0" |
---|---|
Author | Martijn Tonies |
Post date | 2008-06-20T18:16Z |
> > Firebird didn't infer that 1 = 0 is false for all rowsConstants against constants aren't checked, it's a silly query :-)
>
> Well, I sounds to me that he have to ... 1=0 if false in every place in
> of the world <g>
>How about:
> > 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.
>
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