.Net Basic

This blogs gives introduction to C#.NET programming for beginners. This blogs assumes that you have no programming experience whatsoever. It's a lot easier than you think, and can be a very rewarding hobby!after Refer this blog

07 May 2010

How to join tables from different servers?

EXEC sp_addlinkedserver SERVER_01

/* The following command links 'sa' login on SERVER_02 with the 'sa' login of SERVER_01*/

EXEC sp_addlinkedsrvlogin @rmtsrvname = 'SERVER_01', @useself = 'false', @locallogin = 'sa', @rmtuser = 'sa', @rmtpassword = 'sa password of SERVER_01'


SELECT a.title_idFROM SERVER_01.pubs.dbo.titles aINNER JOIN SERVER_02.pubs.dbo.titles bON a.title_id = b.title_idGO

Labels: ,


Post a Comment

Subscribe to Post Comments [Atom]

<< Home