We can retrieve data from more than one tables using the JOIN statement. SQL Server has 4 types of joins:
- INNER JOIN/simple join
- LEFT OUTER JOIN/LEFT JOIN
- RIGHT OUTER JOIN/RIGHT JOIN
- FULL OUTER JOIN
INNER JOIN
This type of JOIN returns rows from all tables in which the join condition is true. It takes the following
Student Table Fee Table

syntax:
SELECT columnsFROM table_1 INNER JOIN table_2ON table_1.column = table_2.column;
SELECT Students.admission, Students.firstName, Students.lastName, Fee.amount_paid FROM Students INNER JOIN Fee ON Students.admission = Fee.admission
No comments :
Post a Comment