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

后端 未结 4 1323
说谎
说谎 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:32

    Easiest way :

    • Click connect to server
    • when it asks for server name use: 192.168.X.X,1433\SQLEXPRESS insted of YOURPC\SQLEXPRESS

    (The ip and opened port of target sql server)

    • Type correct username and password
    • Done!

提交回复
热议问题