open database sql code example
Example 1: sql use database
USE DatabaseName;
Example 2: sql open queyr
SELECT * FROM OPENQUERY (<Linked Server>, 'SELECT name FROM joe.titles WHERE name = ''NewTitle''');
USE DatabaseName;
SELECT * FROM OPENQUERY (<Linked Server>, 'SELECT name FROM joe.titles WHERE name = ''NewTitle''');