MySQL HAVING Clause

In this tutorial, we will learn about the MySQL HAVING Clause. The MySQL HAVING clause is used along with the GROUP BY clause. The HAVING Clause adds a condition to the groups and returns only those groups for whom the condition evaluates to true. In short, it restricts the rows returned by the GROUP BY …

MySQL HAVING Clause Read More »

MySQL Subqueries

In this tutorial, we will learn about how to write MySQL subqueries. A subquery is a query nested within another query. For instance, a subquery can be having a SELECT statement inside another SELECT statement. Multiple MySQL subqueries can be nested within a query. The subquery is called an Inner query and the main query …

MySQL Subqueries Read More »

MySQL DROP and TRUNCATE

In this tutorial, we will learn about the DROP and TRUNCATE statements in MySQL. Suppose we want to delete a table from the database altogether. Or, what if, we want to keep the table but delete all the records in the table? These are common operations in MySQL and for that, we use the DROP …

MySQL DROP and TRUNCATE Read More »

MySQL ALTER Command

The MySQL ALTER command is used to modify an existing table. It forms a part of the Data Definition Language (DDL) in SQL, which deals with the definition of data. Other commands in DDL are – CREATE, RENAME, and DROP. When you go buy pieces of clothing, I’m sure you must have come across a …

MySQL ALTER Command Read More »