Blog Details

WHERE Clause


                                
                                    <h2>* <span style="text-decoration: underline;">SQL WHERE Clause :-</span></h2>
<ul>
	<li><span style="font-size: 13px;">The WHERE clause is used to extract only those records that fulfill a specified criterion.</span></li>
</ul>
<h2>Syntax :</h2>
SELECT <em>column_name</em>,<em>column_name</em>
FROM <em>table_name</em>
WHERE <em>column_name operator value</em>;
<h2> Example 1:</h2>
SELECT * FROM Customers
WHERE City='Rajkot';
<h2>Example 2:</h2>
SELECT * FROM Customers

<em id="__mceDel">WHERE CustomerID=1;</em>
<h2>* <span style="text-decoration: underline;">Operators in The WHERE Clause :-</span></h2>
1)  =                    Equal

<strong>2) </strong>&lt;&gt;                  Not equal. <b>Note:</b> In some versions of SQL this operator may be written as !=

<strong>3) &gt;  </strong>                   Greater than

<strong>4)  &lt;  </strong>                  Less than

<strong>5)   &gt;=</strong>                Greater than or equal

<strong>6)  &lt;=</strong>                 Less than or equal

<strong>7)  </strong>BETWEEN  Between an inclusive range<strong></strong>

<strong>8)</strong> LIKE               Search for a pattern

<strong>9) </strong>IN                   To specify multiple possible values for a column
                                    


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