Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Get Records

Author  Topic 

vishal_114
Starting Member

1 Post

Posted - 2010-08-26 : 09:30:56
I have 2 tables

tbl1 tbl2

Id name Id surname
------------ --------------
1 abc 2 xyz

I want output like

Id name surname
1 abc null

Please help me.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-08-26 : 11:49:37
[code]
select t1.Id,t1.name,t2.surname
from tbl1 t1
left join tbl2 t2
on t2.Id= t1.Id
[/code]

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -