示例(标准风格语法);请确认数据库支持对应关键字。
-- PostgreSQL / standard information schema
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';查看结构元数据;这些命令由客户端提供,并非可移植 SQL。
Use the database client's schema inspection command or query its information schema/catalog.示例(标准风格语法);请确认数据库支持对应关键字。
-- PostgreSQL / standard information schema
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';SQLite 风格示例;实际方言行为可能不同。
-- SQLite
.tables
.schema users| 参数 / 子句 | 说明 |
|---|---|
EXPLAIN | 显示优化器计划采用的执行策略。 |
ANALYZE | 部分数据库会实际执行语句并报告统计;此操作可能运行查询。 |
FORMAT | 在支持时选择执行计划输出格式。 |
Catalog / information schema | 通过系统元数据检查对象和定义。 |
Dialect / version | 对照所用数据库手册核对厂商专属行为。 |
执行前请核对命令和目标路径。修改文件、服务、账户、磁盘、权限或数据库的操作可能难以撤销;建议先在安全环境测试并保留备份。