How to create links to other tables within SQL database?
Can you define more clearly, Alan?
"Alan" <Alan@.discussions.microsoft.com> wrote in message
news:4BDE1092-1974-4958-990B-2FF2B8485DE2@.microsoft.com...
> How to create links to other tables within SQL database?
|||If you want to query a table in another database, but on the same server, as
long as your login is a mapped user in the other database, all you need to do
is qualify the table in your FROM clause:
SELECT ...
FROM <database_name>.<owner>.<table_name|view_name>
WHERE ...
Now, if you want to query a database hosted by another server, you have
several optons:
OPENDATASOURCE
OPENRESULTSET
OPENQUERY
LINKED SERVER
Remember that these are not limited to just remote SQL Servers but any OLEDB
or ODBC compliant source where the drivers have been properly loaded on the
server in question.
Sincerely,
Anthony Thomas
"Alan" wrote:
> How to create links to other tables within SQL database?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment