Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change 
notification.

The "Hive/LanguageManual/DDL" page has been changed by JohnSichi.
http://wiki.apache.org/hadoop/Hive/LanguageManual/DDL?action=diff&rev1=50&rev2=51

--------------------------------------------------

  
  Example: CREATE TABLE test_change (a int, b int, c int);
  
- "ALTER TABLE CHANGE a a1 INT;" will change column a's name to a1.
+ "ALTER TABLE test_change CHANGE a a1 INT;" will change column a's name to a1.
  
- "ALTER TABLE CHANGE a a1 STRING AFTER b;" will change column a's name to a1, 
a's data type to string, and put it after column b. The new table's structure 
is: b int, a1 string, c int.
+ "ALTER TABLE test_change CHANGE a a1 STRING AFTER b;" will change column a's 
name to a1, a's data type to string, and put it after column b. The new table's 
structure is: b int, a1 string, c int.
  
- "ALTER TABLE CHANGE b b1 INT FIRST;" will change column b's name to b1, and 
put it as the first column. The new table's structure is: b1 int, a string, c 
int.
+ "ALTER TABLE test_change CHANGE b b1 INT FIRST;" will change column b's name 
to b1, and put it as the first column. The new table's structure is: b1 int, a 
string, c int.
  
  NOTE: The column change command will only modify Hive's metadata, and will 
NOT touch data. Users should make sure the actual data layout conforms with the 
metadata definition.
  

Reply via email to