Re: Querying tables from different databases
"Henri" <lemartin@nospam.inv> wrote in message
news:3f8065cb$0$27019$626a54ce@news.free.fr...
> Hello,
>
> I am quite new to ms-sql and I have a problem : I want to create an SQL
> request which would copy serveral records from a table in a given database
> to another table (with exactly the same structure) in another database
> (theses two tables and databases already exist).
>
> Could you please tell me how to do this ? I dont know how to access two
> different databases in a single SQL request.
>
use northwind
go
select * from pubs.dbo.authors
go
Basically you need to use the db name and the object owner.
> Thank you for you help.
>
>
> |