Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Sql Sqlbeginner Where Clause in SQL

Related Tutorials


 
 

Share on Google+Share on Google+

Where Clause in SQL

Advertisement
The Where clause in SQL query is used with the SELECT keyword.' Where' clause search the data with a particular condition.

Where Clause in SQL

     

The Where clause in SQL query is used  with the SELECT keyword.' Where' clause search the data with a particular condition. In case the data matches with condition, return you the specific value of particular data value.

Syntax

 

 

 

 

 

 

SELECT column FROM table WHERE column operator value

The Select is used to retrieve the record from a table.  

column : This specify the name of the column, which you want to retrieve from table.

From : The From Keyword specify the name of the table from where data is retrieved.

table :This specify the name of the table.

Where column : The clause where search the data with a particular condition. If data matches with the condition ,return you the specific value of data.

The List of Operator can be used as

Operator Description
= Equal
BETWEEN Between an inclusive range
LIKE

Search for a pattern

IN If you know the exact value you want to return for at least one of the columns

Understand with Example

The Tutorial illustrate an example from where clause in SQL. In this Tutorial we use a select query to retrieve the record from  table 'country'.

select * from country;

The select query return you the records or rows from table country. In case the data matches with the specified condition, return you the specific value of record.

Output of the above query is

The select query used with where clause, which search the data with a particular condition.

select * from country where countryname='India';

Output of the above query is

 

Download Source

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 12, 2008

Related Tutorials

Discuss: Where Clause in SQL  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com