http://timmurphy.org/tag/mysql/http://timmurphy.org/2009/11/17/use-schema_name-in-postgresql/ ====================================For thos ...
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.
海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com
原标题:USE “schema_name” in PostgreSQL
关键词:sql
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。