By 25/02/2016 1 Comments

What Is CROSS JOIN Keyword In SQL?

  • SQL CROSS JOIN keyword returns very large number of rows from multiple database tables.
  • In SQL CROSS JOIN┬áthe total number of rows/records of table1 is multiplied by with each single row/record of table2.
  • In SQL CROSS JOIN each row is a combination of the rows of the first and second table.

Syntax:

SELECT t1.column_name, t2.column_name
FROM table1 t1
CROSS JOIN table2 t2;

Example:

SELECT co.country_name, ci.city_name
FROM country co
CROSS JOIN city ci;

NOTE:
In above example the total number of rows/records of table1 (country) is multiplied by with each single row/record of table2 (city).







← 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 .