Blog Details

WHERE Clause



                                

* SQL WHERE Clause :-

  • The WHERE clause is used to extract only those records that fulfill a specified criterion.

Syntax :

SELECT column_name,column_name FROM table_name WHERE column_name operator value;

 Example 1:

SELECT * FROM Customers WHERE City='Rajkot';

Example 2:

SELECT * FROM Customers WHERE CustomerID=1;

* Operators in The WHERE Clause :-

1)  =                    Equal 2) <>                  Not equal. Note: In some versions of SQL this operator may be written as != 3) >                     Greater than 4)  <                    Less than 5)   >=                Greater than or equal 6)  <=                 Less than or equal 7)  BETWEEN  Between an inclusive range 8) LIKE               Search for a pattern 9) 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