SQL INNER JOIN - Joining Two or More Tables

SQL INNER JOIN - Joining Two or More Tables

SQL INNER JOIN - Joining Two or More Tables:- Inner join returns the rows that match in both tables. Left join returns all rows from the left table. Right join returns all rows from the right table. Full join returns whole rows from both tables.

 

Example

 

select tl.FirstName,tl.MiddleName,tl.LastName,tr.FatherName,tc.CaseType,CONVERT(varchar, tc.Date, 105) as date_entered,
CONVERT(varchar, DOB, 105) as DOB from tbl_Login tl inner join  tbl_Registration tr on tl.ID=tr.UserID
inner join tbl_CaseType tc on tc.ID=tc.UserID where tl.ID=1 and tc.CaseID=1

 

 

2021-10-03