Subject | Re: [firebird-support] slow "where 1=0" |
---|---|
Author | Ivan Prenosil |
Post date | 2008-06-21T11:54:53Z |
> I use to runIf you want to know only the structure, not data, then simply
>
> select * from TABLE where 1=0
>
> to fill an empty datataset with fields structure of any table. The
> thing is that Firebird needs a little while (sometimes a few seconds)
> to do it
do not execute the query, just prepare it
(then using only "select * from TABLE" is o.k.).
Alternatively, if you really want to execute the query
(e.g. because of components limitation), and you want to modify
only WHERE clause (i.e. you do not want SELECT FIRST 0 etc.),
then universal query not depending on table structure is this
SELECT * FROM TAB WHERE RDB$DB_KEY=0
Ivan
http://www.volny.cz/iprenosil/interbase/