On 5/1/07, Adam Balgach <[EMAIL PROTECTED]> wrote:
has the group ever heard of using 1=1 in the where clause of a SQL statement? Some other auto generating sql apps put this in, and I had just never seen it before. I don't think its a. good coding or b. good convention. But I wanted to check before I made a feature request. Thanks, A.
Many people do that for situations where they are unsure if there will be a where clause or not. So, to make things simpler, they just use 1=1 and tack on "AND ..." to the end. As far as I know, there isn't any harm in it. It makes coding SQL statements easier if there is a change there will be no conditional checks ( a grab all ). -- Philip [EMAIL PROTECTED] http://www.gpcentre.net/
