如果两个表在不同的模式中,我们可以在 postgresql 中加入两个表吗
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5712387/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can we join two table in postgresql if both table in different schemas
提问by Deepak Kumar
I have one table in public schema and 2nd table in deepak schema and both the schema are under same database any help ?
我在公共模式中有一张表,在 deepak 模式中有第二张表,并且这两个模式都在同一个数据库下有什么帮助吗?
回答by Michael Krelin - hacker
Sure, just use their fully-qualified names public.t1 JOIN deepak.t2 USING (col)
.
当然,只需使用它们的完全限定名称public.t1 JOIN deepak.t2 USING (col)
。
回答by Brian Roach
Yes, you just prepend the schema.
是的,您只需添加架构。
public.table
deepak.table