Use two database for select and insert

Dear Experts,
I have two different databases. need to connect one to get data and second to insert.

Insert into abc.dbo.a(ID)
Select id from xyz.dbo.d(id)

How i could execute this task please guide
MehramAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
guswebbConnect With a Mentor Commented:
INSERT INTO [abc].[dbo].[a] (id) SELECT id FROM [xyz].[dbo].[d]
0
 
guswebbCommented:
SELECT [xyz].[dbo].[d].[id] INTO [abc].[dbo].[a]
0
 
MehramAuthor Commented:
Sir, the both table already exist. Into will create another table I need make join between both databases to get result and insert into the particular table.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.