Home > DeveloperSection > Forums > SQL INNER JOIN Keyword.
Ankit Singh

Total Post:341

Points:2389
Posted on    November-05-2015 10:03 PM

 .NET SQL Server 
Ratings:


 1 Reply(s)
 315  View(s)
Rate this:
how to use inner join in sqlserver please help me .


aditya kumar Patel

Total Post:250

Points:1782
Posted on    November-05-2015 10:17 PM

 The INNER JOIN keyword selects all rows from both tables as long as there is a                match between the columns in both tables.

Syntax:

SELECT column_name(s)
FROM table1
INNER JOIN table2
ON table1.column_name=table2.column_name where table1.column_name=value;

 

Example:

select a.CustomerID, b.CustomerName,b.ContactName,b.Address,b.City ,

b.Country,a.Orderdate,a.OrderID,a.amount from Customer b inner join [Order] a on a.customerID=b.CustomerID where b.CustomerID=1

 

 

 


Don't want to miss updates? Please click the below button!

Follow MindStick