Is it possible to connect to another SQL Server using a SQL query (so that one can also run queries on that server and use the result set in current server). If not, then why ?
Yes, you can accomplish connecting to another SQL Server by using a Linked Server, or you can query through servers by using openquery:
SELECT * FROM openquery([aa-db-dev01], 'Select * from TestDB.dbo.users')
Querying a linked sql server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With