# DESCRIBE

The `DESCRIBE` command describes the specified table.

## Syntax

```
DESCRIBE [<database_name>.]<table_name>;

```

## Remarks

* `<table_name>` is the name of a table in a database.
* `<database_name>` is the name of a database. Not needed if the table exists in the current database.
* This command can be run on any node (see [Node Requirements for SingleStore Commands](https://docs.singlestore.com/db/v9.1/reference/sql-reference/cluster-management-commands.md) ).
* `key` has three possible values, primary (PRI), unique (UNI), and multiple (MUL).

  * PRI: A primary key can be one or more columns, but cannot be null.
  * UNI: A unique key is similar to a primary but it can have null values.
  * MUL: A multiple key is neither a primary or unique key.  It can have a null value and multiple occurrences of the same value.

> **⚠️ Warning**: When setting a unique or primary key you need to have a shard key. Otherwise you will receive an error.

## Examples

```sql
DESCRIBE test;

```

```output

+-------+-------------+------+-----+---------+----------------+
| Field | Type        | Null | Key | Default | Extra          |
+-------+-------------+------+-----+---------+----------------+
| id    | int(11)     | NO   | PRI | NULL    | auto_increment |
| v     | varchar(10) | NO   |     | NULL    |                |
+-------+-------------+------+-----+---------+----------------+

```

```
DESCRIBE memsql_demo.customer;

```

```output

+------------+---------------+------+-----+---------+-------+
| Field      | Type          | Null | Key | Default | Extra |
+------------+---------------+------+-----+---------+-------+
| custkey    | int(11)       | NO   | PRI | NULL    |       |
| name       | varchar(25)   | NO   |     | NULL    |       |
| address    | varchar(40)   | NO   |     | NULL    |       |
| nationkey  | int(11)       | NO   | MUL | NULL    |       |
| phone      | char(15)      | NO   |     | NULL    |       |
| acctbal    | decimal(15,2) | NO   |     | NULL    |       |
| mktsegment | char(10)      | NO   |     | NULL    |       |
| comment    | varchar(117)  | NO   |     | NULL    |       |
| zip2       | binary(5)     | YES  |     | NULL    |       |
| balance    | double        | YES  |     | NULL    |       |
+------------+---------------+------+-----+---------+-------+
```

***

Modified at: June 11, 2026

Source: [/db/v9.1/reference/sql-reference/data-definition-language-ddl/describe/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/data-definition-language-ddl/describe/)

(An index of the documentation is available at /llms.txt)
