Getting true/false from SQL query -


I need to use a query that the customer has purchased 100 or more unique drinks using the SQL query,

I have done this: WHERE patron_email='smith@gmail.com '

from SELECT COUNT (DISTINCT beer_id) orders

How do I test whether its The result is 100 or more?

Update: Sorry for the unclear question, I have to use standard SQL.

This works in MySQL, not sure about other people: < Pre> SELECT COUNT (DISTINCT beer_id) & gt; 100 ORDERS WHERE patron_email='smith@gmail.com '

Just put a boolean position in the bus SELECT . It will be wrong for the right or evaluate 0 for 1.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -