In this article i will tell you how you can retrieve data from multiple table from sql server by using inner join.
Prepare the table two table for demo purpose.
In this i have defined added the company id by user.
Inner join is the join in which if record is matched only that case record will return.
Now use the below query to retrieve the record.
select U.Id,U.UserId,U.Name,C.CompnayName from UserLogin U
inner join CompanyName C on U.CompanyId=C.Id
inner join CompanyName C on U.CompanyId=C.Id
Now run the query and check the output.
No comments:
Post a Comment