SQL Tutorial
What is SQL SQL SELECT SQL SELECT DISTINCT SQL WHERE SQL INSERT SQL UPDATE SQL DELETE SQL AND, OR & NOT Clause SQL ORDER BY SQL LIKE Clause SQL IN Operator SQL BETWEEN Operator SQL MAX() and MIN() SQL COUNTSQL JOIN
SQL JOIN SQL INNER JOIN SQL LEFT JOIN SQL RIGHT JOIN SQL FULL OUTER JOINSQL WHERE
The Where clause is use to get the exact value from a record.
You can also get values by giving condition.
Note: The WHERE clause is not only used in SELECT statements, it is also used in UPDATE, DELETE, etc.!
Syntax:
SELECT * FROM table_name WHERE condition;
Example Database:
This is customers table
id | name | Location |
---|---|---|
1 | Kailash | Delhi |
2 | Amit | Haryana |
3 | Siddarth | Noida |
3 | Vikas | Noida |
WHERE Clause Example:
Example1: Select all the customers from noida location
Syntax:
SELECT * FROM customers WHERE location = 'Noida';
Result:
id | name | Location |
---|---|---|
3 | Siddarth | Noida |
4 | Vikas | Noida |
Example2: Select customer details using id.
Syntax:
SELECT * FROM customers WHERE id= 3;
Result:
id | name | Location |
---|---|---|
3 | Siddarth | Noida |
Example3: Select name from customers table. Which is belongs to noida location
Syntax:
SELECT name FROM customers WHERE location = 'Noida';
Result:
name |
---|
Siddarth |
Vikas |
SEARCH POST HERE
Support Us
Subscribe My YouTube Channel
Join Our Telegram Channel & Support Eachother
CATEGORIES
INTERVIEW QUESTIONS
POPULAR POSTS
Elevenstech Web Tutorials
Elevenstech Web Tutorials helps you learn coding skills and enhance your skills you want.
As part of Elevenstech's Blog, Elevenstech Web Tutorials contributes to our mission of “helping people learn coding online”.
Read More
Newsletter
Subscribe to get the latest updates from Elevenstech Web Tutorials and stay up to date