Jump to content

What's the use of 'WHERE TRUE' ?


terryds
 Share

Recommended Posts

The only reason I'll do something like that is if I have a list of possible where conditions that I may add to the query, and want to make sure there is at least one condition so that everything else can have AND before it. Using those conditions has no other effect on a query, they just tell it to return all rows.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...