Back to home page

OSCL-LXR

 
 

    


0001 CREATE TABLE table_with_comment (a STRING, b INT, c STRING, d STRING) USING parquet COMMENT 'added';
0002 
0003 DESC FORMATTED table_with_comment;
0004 
0005 -- ALTER TABLE BY MODIFYING COMMENT
0006 ALTER TABLE table_with_comment SET TBLPROPERTIES("comment"= "modified comment", "type"= "parquet");
0007 
0008 DESC FORMATTED table_with_comment;
0009 
0010 -- DROP TEST TABLE
0011 DROP TABLE table_with_comment;
0012 
0013 -- CREATE TABLE WITHOUT COMMENT
0014 CREATE TABLE table_comment (a STRING, b INT) USING parquet;
0015 
0016 DESC FORMATTED table_comment;
0017 
0018 -- ALTER TABLE BY ADDING COMMENT
0019 ALTER TABLE table_comment SET TBLPROPERTIES(comment = "added comment");
0020 
0021 DESC formatted table_comment;
0022 
0023 -- ALTER UNSET PROPERTIES COMMENT
0024 ALTER TABLE table_comment UNSET TBLPROPERTIES IF EXISTS ('comment');
0025 
0026 DESC FORMATTED table_comment;
0027 
0028 -- DROP TEST TABLE
0029 DROP TABLE table_comment;