describe_table
Inspect table or view structure: columns, types, nullability, defaults, comments, primary keys, constraints, indexes, view SQL, and partitions before writing or validating queries.
Instructions
查看表/视图的完整结构:列清单(类型/可空/默认值/注释)、主键与约束、全部索引及其定义;视图返回视图定义 SQL,分区表返回分区清单。适用场景:编写或校对查询前了解表结构、关联键与索引设计。table 为必填(可来自 list_tables 的结果);schema 省略时自动在非系统模式中查找,存在同名表时请显式指定 schema。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | 表名或视图名(必填),可来自 list_tables 的结果 | |
| schema | No | 模式名,可来自 list_schemas 的结果;省略时自动在非系统模式中查找(歧义时报错) | |
| instance | No | 数据源名称,省略时使用默认实例。可选实例:demo(默认) |