Hello friend, welcome to my today's post on MySQL. In my last tutorial, we learned about "4 Major SQL command categories". Hope you enjoyed that tutorial. Today we are going to learn about "Introducing SQL Comparison and Logical operators". So, Let's start -
There are two type of SQL Operators, namely Comparison Operators and Logical Operators. These operators are used mainly in the WHERE clause, HAVING clause to filter the data to be selected. Now go for details -
Comparison operators are used to compare the column data with specific values in a condition. Comparison Operators are also used along with the SELECT statement to filter data based on specific conditions.
The below table describes each comparison operator.
|<>, !=||is not equal to|
|>=||greater than or equal to|
|<=||less than or equal to|
There are three Logical Operators namely, AND, OR, and NOT. These operators compare two conditions at a time to determine whether a row can be selected for the output.
When retrieving data using a SELECT statement, you can use logical operators in the WHERE clause, which allows you to combine more than one condition.
Was this information useful? What other tips would you like to read about in the future? Share your comments, feedback and experiences with us by commenting below!
You might also like...