In SQL, the WHERE clause allows you to filter data based on specific conditions. It's like telling the database: "I only want to see rows that match these criteria."
The basic syntax of a WHERE clause is:
Loading editor...
Let's look at a simple example using our Codémon table:
Loading data...
↗️
Loading editor...
↶
↷
This query returns only the Codémon with the 'water' type. The WHERE clause filters out all other types.
String Values in SQL
In SQL, text values (strings) are usually enclosed in single quotes ('). For example: WHERE name = 'Aquachu'