for default instance name
SELECT * FROM [LinkServerName].DatabaseName.dbo.TableName
SELECT * FROM OPENQUERY([LinkServerName], 'SELECT * FROM TableName')
SELECT * FROM OPENQUERY([LinkServerName], 'SELECT * FROM TableName')
for other instance name
SELECT * FROM [LinkServerName\InstanceName].DatabaseName.dbo.TableName
SELECT * FROM OPENQUERY([LinkServerName\InstanceName], 'SELECT * FROM TableName')
SELECT * FROM OPENQUERY([LinkServerName\InstanceName], 'SELECT * FROM TableName')
other method
SELECT * FROM LinkServerName..UserName.TableName
No comments:
Post a Comment