How can I connect to an external database from a sql statement or a stored procedure?

后端 未结 4 1322
说谎
说谎 2020-12-17 21:47

When running a SQL statement or a stored procedure on a database, can you connect to an external database and pull data from there?

something like:

S         


        
4条回答
  •  清酒与你
    2020-12-17 22:13

    Yes, you can. You should take a look at linked servers for starters. You can also use OPENROWSET to hit them directly with no linked server.

提交回复
热议问题