⌘+k ctrl+k
1.4 (LTS)
搜索快捷键 cmd + k | ctrl + k
USE 语句

USE 语句用于选择一个数据库及可选的模式,或仅选择一个用作默认的模式。

示例

--- 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 语句设置一个默认的数据库、模式或数据库/模式组合,以供后续操作使用。例如,在未提供全限定表名的情况下创建的表,将被创建在默认数据库中。

© 2025 DuckDB 基金会,阿姆斯特丹,荷兰
行为准则 商标使用指南