Advertisement: Over 100,000 Jobs Worldwide. Click here to find one for you.

MySQL FAQs
FAQs Categories
Client Server Commands
Database Structure
Table Types or Storage Engines
Indexes
SQL Statements
Table Joins
Funtions and Operators
Tricky Select Queries
Speed Up Queries
Data Back Up
General Questions
Errors


http://www.careermidway.com
 
Home / Table Joins / Question No: 128

What is difference between ON Clause and WHERE Clause?

I am learning database query basics.  I could not understand ON Clause clearly.  Can I know what is difference between ON Clause and WHERE Clause?

Answer No: 128

There is little difference between them.  The ON Clause works just like a WHERE Clause but the ON Clause is specific to a JOIN condition.  If you need to, you can add extra conditions to the ON Clause using AND, just as you can with WHERE Clause.

Related MySQL FAQs to the Above FAQ

How-to-delete-or-update-records-of-multiple-tables-in-one-go How to delete or update records of multiple tables in one go?

How-to-get-record-from-first-table-joining-with-second-table-without-any-active-record-between-them How to get record from first table joining with second table without any active record between them?

About SiteAbout FAQsAffiliates and Sponsors
© 2007 - 2010  www.mysqlfaqs.net
All rights reserved. The site is owned and operated by Mr. Javed Bhatti - Pakistan.