Get the create table statement for an existing Hive table using Show create table

The SHOW statement is a flexible way to get the information about existing objects in Hive. One of the Show statement is Show create table which is used to get the create table statement for the existing Hive table.

Show Create Table

Show Create Table which generates and shows the Create table statement for the given table.

Syntax for Show create table

Example

The table cust_txn is already exist in hive as below.

Show Create Table example1

If we ran the show create table statement for this table cust_txn,It will generate the Create table statement as below.

Recommended Articles