Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
Node is saved as draft in My Content >> Draft
  • Cross Join In Sql

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 429
    Comment on it

    Cross Join:

    The Cross Join command helps to Join two Two table by a Cartesian method. Means that number of rows in the first table will get multiplied with the number of Rows in the Second table.

    The Cartesian method can be understood by taking two sets A= {5,2,6} and B={1,2} .Then The Cartesian Product obtained will be A*B ={(5,1),(5,2),(2,1),(2,2),(6,1),(6,2) }

    In this way, the two table will get merge together to produce a set of desired result.

    Syntax :

    SELECT * FROM table1 CROSS JOIN table2;

    Lets consider two table foods and company in which Cross Join Operation Is Applied as

        SELECT foods.item_name,foods.item_unit,  
        company.company_name,company.company_city   
        FROM foods   
        CROSS JOIN company;  

     

    SQL Cross Join in Sql Cross Join

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: