Re: Possible to get field names and types in a table without executing a query?
- From: alexander@xxxxxxxx (Alexander Foken)
- Date: Tue, 27 Jun 2006 17:21:36 +0200
On 27.06.2006 17:03, brian.barto@xxxxxxxxxxxxxxxxxxx wrote:
Tried it and it works just fine. I guess I specified no where clauseExactly that. "Dear SQL Engine, please give me all rows where zero is one." You could also have used "WHERE 'dog' = 'cat'" or "WHERE 'red'='blue'". It's just a twisted way of saying "give me no rows". SQL's SELECT bases on something called "set theory" (http://en.wikipedia.org/wiki/Set_theory), which means that you have to find a way to separate all the rows in your table / view into wanted (the result set) and unwanted ones. Asking for "WHERE 0=1" just makes sure that your result set is empty.
because I thought a value of a known field would have to be greater,
lesser, or equal to something and I wouldn't be able to depend on the
value of the fields, let alone even knowing their names. Didn't know you
could do THAT, though.
So what does "WHERE 0=1" actually mean? Just curious. :)
- Brian
Alexander
--
Alexander Foken
mailto:alexander@xxxxxxxx http://www.foken.de/alexander/
.
- References:
- Prev by Date: RE: Possible to get field names and types in a table without executing a query?
- Next by Date: Re: Possible to get field names and types in a table without executing a query?
- Previous by thread: RE: Possible to get field names and types in a table without executing a query?
- Next by thread: In search of ParamValues in error handler after a do call fails
- Index(es):
Relevant Pages
|