Search code examples
sqlpostgresqlschema

Querying across schemas in Postgres


I am using Postgres and I have multiple schemas (i.e. S1 and S2). I would like to run a query that uses tables in S1 and S2. is it possible to do something like this:

select * from S1.table1, S2.table2

Thanks for all replies.


Solution

  • Yes. And the syntax is exactly how you wrote.