JOIN Operation In MYSQL

LEFT JOIN Operation IN MYSQL

1. Select All row from Table Left (Table 1) even if there are no matches in the right table (table2).
2. select All Row from Right Table (Table2) who is match in left Table ;

SELECT * FROM Table1 LEFT JOIN Table2 ON Table1.colName=Table2.colName



RIGHT JOIN Operation IN MYSQL

1. Select All row from RIGHT Table (Table 2) even if there are no matches in the left table (table1).
2. select All Row from left Table (Table1) who is match in RIGHT Table ;
SELECT * FROM Table1 RIGHT JOIN Table2 ON Table1.colName=Table2.colName

FULL JOIN Operation IN MYSQL

1. Select All row from Both Table(Table1 , Table2)


SELECT * FROM Table1 FULL JOIN Table2 ON Table1.colName=Table2.colName

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s