---
title: "When do you use WHERE clause and when do you use HAVING clause?"  
description: "When do you use WHERE clause and when do you use HAVING clause?"  
author: "Sumit Kesarwani"  
published: 2014-01-31  
updated: 2020-09-01  
canonical: https://www.mindstick.com/interview/1909/when-do-you-use-where-clause-and-when-do-you-use-having-clause  
category: "mysql"  
tags: ["mysql"]  
reading_time: 1 minute  

---

# When do you use WHERE clause and when do you use HAVING clause?

The WHERE condition lets you restrict the rows selected to those that satisfy one or more conditions.Use the HAVING clause to restrict the groups of returned rows to those groups for which the specified condition is TRUE

## Answers

### Answer by Sumit Kesarwani

The WHERE condition lets you restrict the rows selected to those that satisfy one or more conditions.Use the HAVING clause to restrict the groups of returned rows to those groups for which the specified condition is TRUE


---

Original Source: https://www.mindstick.com/interview/1909/when-do-you-use-where-clause-and-when-do-you-use-having-clause

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
