USE 语句
USE 语句用于选择一个数据库和可选的 schema,或仅选择一个 schema 作为默认值。
示例
--- Sets the 'memory' database as the default. Will use 'main' schema implicitly or error
--- if it does not exist.
USE memory;
--- Sets the 'duck.main' database and schema as the default
USE duck.main;
-- Sets the `main` schema of the currently selected database as the default, in this case 'duck.main'
USE main;
语法
USE 语句会设置默认的数据库、schema,或数据库/schema 组合,供后续操作使用。
例如,在未提供完全限定表名的情况下创建的表,会创建在默认数据库中。