Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一张有很多列的桌子。我不想写类似的东西
CREATE TABLE IF NOT EXISTS table1( col1 int, col2 String, etc....)
有没有一种快速的方法来创建具有相同结构但没有任何数据的表?
尝试这个:
CREATE TABLE some_db.T1 LIKE some_db.T2
请参阅本手册:https ://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTableLike