MySQL OR – Comparison Functions and Operators By Example

MySQL logical OR operator compares two expressions as well as this is a returns boolean data like as a true if any single of the expressions are true.

Comparison Functions and Operators – MySQL

mysql tutorial, if, like, contains, comparison, operators, bitwise operators and between.

TRUE FALSE NULL
TRUE TRUE TRUE TRUE
FALSE TRUE FALSE NULL
NULL TRUE NULL NULL

set operators in sql

Read Also:  PHP Laravel get months between two dates

MySQL OR Operator Example

SELECT    
	membername, 
	place
FROM    
	members
WHERE place = 'INDIA' OR 
      place = 'JAPAN';

Example

SELECT   
	membername, 
	place, 
	creditLimit
FROM   
	members
WHERE(place = 'INDIA'
		OR place = 'JAPAN')
	  AND creditlimit > 100000;

Example

SELECT    
	membername, 
	place, 
	creditLimit
FROM    
	members
WHERE place = 'INDIA'
		OR place = 'JAPAN'
		AND creditlimit > 10000;

I hope you get an idea about WHERE, AND, OR, IN, NOT IN.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Read Also:  Laravel Search Multiple Columns

Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  Pagination with jQuery Ajax PHP and MySQL
  2. Read Also:  Download Remote File via PHP CURL
  3. Read Also:  Laravel 6 Join multiple tables Eloquent Examples
  4. Read Also:  How to Set Headers in Laravel 6 Example?
  5. Read Also:  Laravel 6 Count from Join Example
  6. Read Also:  get hours/months time difference between two dates in Laravel
  7. Read Also:  laravel cache clear
  8. Read Also:  Vue.js CRUD Example Tutorial For Beginners
  9. Read Also:  Laravel GroupBy Error Solution 5.5 , 5.6, 5.7
  10. Read Also:  MySQL Remove special characters from database