USE “schema_name” in PostgreSQL

Posted 功夫 熊猫

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了USE “schema_name” in PostgreSQL相关的知识,希望对你有一定的参考价值。

http://timmurphy.org/tag/mysql/

http://timmurphy.org/2009/11/17/use-schema_name-in-postgresql/

 ====================================

For those moving from MySQL to PostgreSQL, there are a few differences which you will need to get used to.  One of these differences is the USE command, used to select the schema to select tables, views, etc from.

PostgreSQL does not have the USE command.  Instead, you can use:

SET search_path TO [schema_name]

For example, if we have a schema mySchema in which we are querying the person table, instead of SELECT * FROM mySchema.person, we can simply type SET search_path TO mySchema and use SELECT * FROM person for all subsequent queries.  mySchema will remain the default schema until the next SET command is issued, or the connection is closed.

以上是关于USE “schema_name” in PostgreSQL的主要内容,如果未能解决你的问题,请参考以下文章

error: possibly undefined macro: LT_SYS_SYMBOL_USCORE please use m4_pattern_allow

找到没有元数据表的非空模式`schema_name`

地址已经被使用 - Address already in use

如何在SQL Server中获得列式约束

Linux手动释放内存

SQL SERVER sys.sp_addextendedproperty 添加扩展属性