Popular
- Get link
- X
- Other Apps
Hello everyone, this is the next lesson in the Java Fullstack Developer tutorial. In this video, we will learn about basic data query statement in mysql
We will first learn about the simplest query structure
SELECT *
FROM table_name;
SELECT column1, column2
FROM table_name;
Next, we will move on to the WHERE clause & Where Operators.
the WHERE clause is used to filter records based on specific conditions. The WHERE clause is placed after the table name in a SELECT, UPDATE, or DELETE statement
Now, we will go through some the WHERE operators
1. Comparision operators: Comparison operators in SQL are used to compare two expressions
2. AND & OR: The AND and OR operators in SQL is used to combine multiple conditions
3. BETWEEN … AND: The BETWEEN ... AND operator in SQL is used to filter the result set within a specified range
4. IN : The IN operator in SQL are used to filter records based on whether a value is in a specified list of values. You can put NOT before IN to get the opposite result
5. LIKE/ NOT LIKE : The LIKE operator in SQL is used to search for a specified pattern in a column. It is particularly useful for filtering rows based on partial string matching or pattern matching.
- % use percent to Represent zero, one, or multiple characters
- Similar IN, you can also put NOT before LIKE to get the opposite result
6. IS NULL/ IS NOT NULL: IS NULL is to check if a column or an expression contains a NULL value
- You can also put NOT before it like IN or LIKE perators
Watch video below for more details:
- Get link
- X
- Other Apps
Comments
Post a Comment