Database Reference
In-Depth Information
SHOW TABLES;
SHOW TABLES [IN database_name];
The DESCRIBE statement
Using the DESCRIBE statement, you can learn more about the table metadata with
the following syntax:
DESCRIBE table_name;
Alternatively, you can use the FORMATTED clause with the DESCRIBE statement,
which will provide various other information about the table, as follows:
DESCRIBE [FORMATTED] table_name;
Here is an example of using DESCRIBE and DESCRIBE FORMATTED to help you un-
derstand the difference between the two.
The following code shows how DESCRIBE displays the output:
[Hadoop.testdomain:21000] > create table
students (sno int, name string);
Query: create table students (sno int, name
string)
[Hadoop.testdomain:21000] > describe students;
Query: describe students
Query finished, fetching results ...
+------+--------+---------+
| name | type | comment |
+------+--------+---------+
| sno | int | |
| name | string | |
+------+--------+---------+
Returned 2 row(s) in 1.66s
Search WWH ::




Custom Search