Previous Next JavaScript must be enabled to correctly display this content

## describe

    describe | desc [as json]
     {table table_name [field_name[,...] ] |
     index index_name on table_name
     }

Describes information about a table or index, optionally in JSON format.

Specify a fully-qualified `table_name` as follows:

Entry specification | Description
--- | ---
`table_name` | Required. Specifies the full table name. Without further qualification, this entry indicates a table created in the default namespace (sysdefault), which you do not have to specify.
`parent-table.child-table` | Specifies a child table of a parent. Specify the parent table followed by a period (.) before the child name. For example, if the parent table is `Users`, specify the child table named `MailingAddress` as `Users.MailingAddress`.
`namespace-name:table-name` | Specifies a table created in the non-default namespace. Use the namespace followed by a colon (:). For example, to reference table `Users`, created in the `Sales` namespace, enter table_name as `Sales:Users`.

Following is the output of `describe` for table `ns1:t1`:

    sql-> describe table ns1:t1;
     === Information ===
     +-----------+------+-----+-------+----------+----------+--------+----------+---------+-------------+
     | namespace | name | ttl | owner | sysTable | r2compat | parent | children | indexes | description |
     +-----------+------+-----+-------+----------+----------+--------+----------+---------+-------------+
     | ns1       | t1   |     |       | N        | N        |        |          |         |             |
     +-----------+------+-----+-------+----------+----------+--------+----------+---------+-------------+

     === Fields ===
     +----+------+---------+----------+-----------+----------+------------+----------+
     | id | name |  type   | nullable |  default  | shardKey | primaryKey | identity |
     +----+------+---------+----------+-----------+----------+------------+----------+
     |  1 | id   | Integer | N        | NullValue | Y        | Y          |          |
     +----+------+---------+----------+-----------+----------+------------+----------+
     |  2 | name | String  | Y        | NullValue |          |            |          |
     +----+------+---------+----------+-----------+----------+------------+----------+

    sql->

This example shows using `describe as json` for the same table:

    sql-> describe as json table ns1:t1;
    {
      "json_version" : 1,
      "type" : "table",
      "name" : "t1",
      "namespace" : "ns1",
      "shardKey" : [ "id" ],
      "primaryKey" : [ "id" ],
      "fields" : [ {
        "name" : "id",
        "type" : "INTEGER",
        "nullable" : false,
        "default" : null
      }, {
        "name" : "name",
        "type" : "STRING",
        "nullable" : true,
        "default" : null
      } ]
    }