0

Possible Duplicate:
How do I make a query return nothing when there are no conditions?

If I have a query,I don't want any results returned when it isn't provided with any WHERE clause information.

In simpler terms, how do I make a query non-greedy?

Community
  • 1
  • 1
Alexander Trauzzi
  • 7,277
  • 13
  • 68
  • 112

1 Answers1

1

I think this would do the trick for you:

SELECT *
FROM Table
WHERE 1=0
OR (some other criteria)
Jim
  • 3,482
  • 22
  • 18