Updated on 2022-11-18 GMT+08:00

SHOW CREATE VIEW

Syntax

SHOW CREATE VIEW view_name

Description

This statement is used to display the SQL creation statement of a specified data view.

Example

To display the SQL statement that can be used to create the order_view view:

SHOW CREATE VIEW test_view;
              Create View              
---------------------------------------
 CREATE VIEW hive.default.test_view AS 
 SELECT                                
   orderkey                            
 , orderstatus                         
 , (totalprice / 4) quarter            
 FROM                                  
   orders                          
(1 row)