USE db_name
功能描述
连接到当前数据库。
注意事项
- 仅支持USE当前连接的数据库,不支持连接到其他数据库。若USE的数据库名不是当前数据库,则报错。
语法格式
1. USE db_name
参数说明
- db_name
数据库名。
示例
1. create database testd with dbcompatibility = 'd';
2. \c testd
3. create extension shark;
5. use testd;
6. NOTICE: Already connected to database 'testd'.
8. use test1;
9. ERROR: Use of non-current database 'test1' is not supported.
相关链接
N/A
