How to join 2 datatables using left outer join

Posted by Anu_dgr8 under C# on 3/18/2011 | Points: 10 | Views : 5371 | Status : [Member] | Replies : 2
How to join 2 datatables using left outer join?
both have doctor_id as the common field

Thanks and Regards,
Hoosha Boosha



Responses

Posted by: Mesh_2010 on: 3/19/2011 [Member] Starter | Points: 25

Up
0
Down

Hi,

use this query left uoter join with two table

[code]
select t1.col_name1, t2.colname2 from table1 t1 left join table2 t2 on t1.doctor_id=t2.doctor_id
[/code]

Thanks
RameSH sinGH

Anu_dgr8, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi on: 3/19/2011 [Member] Starter | Points: 25

Up
0
Down
Hai, this is sakthi
you should use the inner join
select t1.id,t2.name from t1 inner join t2 on t1.id=t2.id
you should get result what are the records is matching

try it
thank you





Anu_dgr8, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response