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 accelerator xampp install and/or enable

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:  PHP Laravel Get Last Inserted ID in MySQL Table

Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  Html Form class not found in Laravel
  2. Read Also:  Multiple File Upload in laravel 7 Example Tutorial
  3. Read Also:  laravel cache clear
  4. Read Also:  PHP AJAX Live Search Box Autocomplete Using MySQL Database
  5. Read Also:  Laravel AJAX Live Search Example
  6. Read Also:  jQuery Ajax Login Script using PHP MySQLi
  7. Read Also:  MySQL BETWEEN Operators with WHERE Condition
  8. Read Also:  Laravel 7 jQuery Ajax Image Upload Tutorial
  9. Read Also:  PHP Create ZIP File In Laravel Using Zipper package
  10. Read Also:  laravel Add cascade on delete (ON DELETE CASCADE)
CLOSEX