DESCRIBE TABLE¶
Description¶
The DESCRIBE TABLE statement prints the schema details of a specified table, including column names, data types, maximum byte sizes, primary key status, and semantic indexing status.
Syntax¶
(See the Syntax Notation Guide for notation rules).
Basic syntax¶
Full syntax¶
Parameters¶
| Parameter | Description |
|---|---|
<table> |
The name of the table to describe. |
Example¶
Expected Output¶
Table: students
Columns: 4
--------------------------------------------------
Name Type Size PK Semantic
--------------------------------------------------
id INT 4 YES NO
name STRING 50 NO NO
gpa FLOAT 4 NO NO
is_enrolled BOOL 1 NO NO
--------------------------------------------------
Described table 'students'
Errors & Edge Cases¶
| Error Condition | Error Message |
|---|---|
| Table Does Not Exist | No such table: '<table>' |
Related Commands¶
CREATE TABLE— Define a table.SHOW TABLES— List available tables.