Search Postgresql Archives

Re: Cross database queries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/9/05 10:21 AM, "postgresql@xxxxxxxxxxxx" <postgresql@xxxxxxxxxxxx>
wrote:

> Hi
> 
> Suppose I have two databases on one server (lets call them DB_A and DB_B)
> and I was to write a cross database query. How do I do this in PostgreSQL?
> 
> On MS-SQL I would do something like:
> 
> SELECT ta.Field1, ta.Field2, tb.Field2
> FROM DB_A.dbo.SomeTable ta
> JOIN DB_B.dbo.SomeOtherTable tb
> ON ta.Field1 = tb.Field1

See /contrib/dblink in the postgresql source distribution.

Sean


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux