Querying a linked sql server

后端 未结 7 1788
醉话见心
醉话见心 2020-12-08 20:08

I added a linked server, which is showing in the linked server list, but when I query it, it throws an error with the db server name.

EXEC sp_helpserver
EXE         


        
7条回答
  •  轮回少年
    2020-12-08 20:55

    SELECT * FROM [server].[database].[schema].[table]
    

    This works for me. SSMS intellisense may still underline this as a syntax error, but it should work if your linked server is configured and your query is otherwise correct.

提交回复
热议问题