archive 2019-12-14
5.Hive中视图的查询和普通查询类似,查询时把表名更换为视图名即可。
CREATE VIEW [IF NOT EXISTS] view_name [(column_name [COMMENT column_comment], ...) ] [COMMENT view_comment] [TBLPROPERTIES (property_name = property_value, ...)] AS SELECT ...
DROP VIEW [IF EXISTS] view_name
ALTER VIEW view_name SET TBLPROPERTIES table_properties table_properties: : (property_name = property_value, property_name = property_value, ...)