By 25/02/2016 1 Comments

What Is FULL OUTER JOIN Keyword In SQL?

  • SQL FULL OUTER JOIN keyword returns all rows from both tables (left and right).
  • SQL FULL OUTER JOIN keyword combines the result of both LEFT JOIN and RIGHT JOIN.
  • MySQL database does not support FULL OUTER JOIN keyword so UNION operator might be used (see following example).

Syntax:

SELECT column_name(s)
FROM table1
FULL OUTER JOIN table2
ON table1.column_name=table2.column_name;

Example: Using UNION Operator In MySQL Database

SELECT co.country_name, ci.city_name
FROM country AS co
RIGHT JOIN city AS ci
ON co.country_id = ci.country_id

UNION

SELECT ci.city_name, co.country_name
FROM city AS ci
LEFT JOIN country AS co
ON ci.country_id = co.country_id;





Next Tutorial →


← Previous Tutorial


Posted in: Sql

Leave your valuable Comment

Have a natural attraction for women cosmetics and replica watches uk clothes, no
more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment rolex replica watch. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the replica watches .