Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.
The following page has been changed by RaghothamMurthy: http://wiki.apache.org/hadoop/Hive/HiveQL ------------------------------------------------------------------------------ == Create Table == {{{ - CREATE TABLE tablename + CREATE [EXTERNAL] TABLE table_name (col_name data_type [col_comment], col_name data_type [col_comment], ...) [PARTITIONED BY (col_name data_type [col_comment], col_name data_type [col_comment], ...)] [CLUSTERED BY (col_name, col_name, ...) [SORTED BY (col_name, ...)] INTO num_buckets BUCKETS] - [row_format] + [ROW FORMAT row_format] - [file_format] + [STORED AS file_format] + [LOCATION hdfs_path] data_type - : primitive_type + : primitive_type | array_type | map_type @@ -36, +37 @@ : MAP < primitive_type, primitive_type > row_format - : ROW FORMAT DELIMITED [FIELDS TERMINATED BY char] [COLLECTION ITEMS TERMINATED BY char] [MAP KEYS TERMINATED BY char] [LINES TERMINATED BY char] + : DELIMITED [FIELDS TERMINATED BY char] [COLLECTION ITEMS TERMINATED BY char] + [MAP KEYS TERMINATED BY char] [LINES TERMINATED BY char] - | ROW FORMAT SERIALIZER serde_name [WITH PROPERTIES property_name=property_value, property_name=property_value, ...] + | SERIALIZER serde_name [WITH PROPERTIES property_name=property_value, property_name=property_value, ...] + + file_format: + : SEQUENCEFILE + | TEXTFILE }}} + == Drop Table == + {{{ + DROP TABLE table_name + }}} + + == Alter Table == + === Rename Table === + {{{ + ALTER TABLE table_name RENAME TO new_table_name + }}} + + === Add Columns === + {{{ + ALTER TABLE table_name ADD COLUMNS (col_name data_type [col_comment], ...) + }}} + + === Drop Partitions === + {{{ + ALTER TABLE DROP partition_spec, partition_spec,... + + partition_spec: + : PARTITION (partition_col = partition_col_value, partition_col = partiton_col_value, ...) + }}} = Data Manipulation Statements =
