Outdated Version
You are viewing an older version of this section. View current production version.
DESCRIBE
Describe the specified table.
Syntax
DESCRIBE [db_name.]table_name
Remarks
table_name
is the name of a table in a MemSQL database.db_name
is the name of a MemSQL database. Not needed if the table exists in the current MemSQL database.- This command can be run on any MemSQL node (see Node Requirements for MemSQL Commands ).
Examples
memsql> DESCRIBE test;
+-------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| v | varchar(10) | NO | | NULL | |
+-------+-------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)
mysql> describe memsql_demo.customer;
+------------+---------------+------+-----+---------+-------+
| 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 | |
+------------+---------------+------+-----+---------+-------+
10 rows in set (0.00 sec)