Support Questions

Find answers, ask questions, and share your expertise

how to a add specific column between the columns in hive?

avatar
New Contributor
 
1 REPLY 1

avatar

@Sura Reddy Have you tried with

// Next change column a1's name to a2, its data type to string, and put it after column b.
ALTER TABLE test_change CHANGE a1 a2 STRING AFTER b;

This is documented as part of https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-AlterTableProp...

HTH

*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.