Tutorials Hut

  • SQL Testing




  • SQL- Inner JOIN with example

    An INNER JOIN between two or more tables is the Cartesian product that satisfies the join condition in the WHERE clause.

    • Inner  join fetch the  data from two or more related tables.
    • JOIN is same as INNER JOIN ,Join can be also written instead of Inner Join.
    SQL INNER JOIN

    Syntax:

    SELECT select_List FROM table1 INNER JOIN table2
            ON table1.matchingColoumn= table2.matchingColoumn;

    Consider Employee table having below records.

    Employee_Table1

    Consider Department table having below records.

    DepartmentTable2

    List all the employees along with department details.

    Select  e1.EmployeeID ,e1.Employee_FirstName ,e1.Employee_LastName ,e1.City , d.DepartmentID , d.departmentName 
    from Employee e1 INNER  JOIN Department d
    on e1.DepartmentID=d.DepartmentID



  • SQL Testing


















  • Leave a Reply

    Your email address will not be published. Required fields are marked *