Blog Details

AND & OR Operators


                                
                                    <h1></h1>
<h2>*<span style="text-decoration: underline;"> SQL AND &amp; OR Operators :-</span></h2>
&nbsp;
<ul>
	<li><span style="font-size: 13px;">The AND &amp; OR operators are used to filter records based on more than one condition.</span></li>
	<li><span style="font-size: 13px;">The AND operator displays a record if both the first condition AND the second condition are true.</span></li>
	<li><span style="font-size: 13px;">The OR operator displays a record if either the first condition OR the second condition is true.</span></li>
</ul>
&nbsp;
<h2>AND Operator Example :</h2>
SELECT * FROM Customers
WHERE Country='Germany'
AND City='rajkot';

&nbsp;
<h2>OR Operator Example :</h2>
SELECT * FROM Customers
WHERE City='Berlin'
OR City='rajkot';

&nbsp;
<h2>Combining AND &amp; OR</h2>
SELECT * FROM Customers
WHERE state='gujrat'
AND (City='Berlin' OR City='München');

&nbsp;
<h2></h2>
                                    


Categories

Php mysql

Latest posts

13.05.14
Implementing CRUD Operations ¶

<ul> <li>Now comes the fun part. We would like t

13.05.14
View

<ol> <li><a href="http://www.yiiframework.com/do

13.05.14
Creating Model

<ol> <li><a href="http://www.yiiframework.com/do

Get Free Quote