>String select = "select * from " + table + " WHERE 1 = 0";
>rs = stmt.executeQuery(select); ...
since 1 is never 0, why are you doing this? It should return nothing.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Chris ( Val ) - 03 Nov 2007 09:44 GMT
On Nov 3, 2:13 pm, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> >String select = "select * from " + table + " WHERE 1 = 0";
> >rs = stmt.executeQuery(select); ...
>
> since 1 is never 0, why are you doing this? It should return nothing.
It is a special trick/query used to return all the columns
in a table without any data, but I can't see its immediate
validity in this context.
It is normally used to create a copy of a table without data.
--
Chris