April 2016
Beginner
268 pages
5h 32m
English
In this recipe, you will learn how to see the create statement of a table in Hive.
This command shows the CREATE TABLE statement of a table. The general syntax for showing the CREATE TABLE statement is as follows:
SHOW CREATE TABLE ([db_name.]table_name|view_name);
Where:
[db_name.]: Is an optional clause. This is used when you want to see the CREATE TABLE statement of a table from a different database.
Use the following commands to show CREATE TABLE in Hive:
CREATE TABLE statement for the Sales table:
Show create table Sales;
CREATE TABLE statement for the Sales table under the Hive_learning database:
Show create table Hive_learning.Sales;