[Hive] Hive inserts data

create table student(id string, name string);

 

insert overwrite table  student select id, name from user where age > 10;

insert into table  student select id, name from user where age > 10;

 

 

But it is not possible to formulate field information in the insert table, it is not supported

insert overwrite table  student(id, name) select id, name from user where age > 10;

 

https://blog.csdn.net/wypblog/article/details/13631649

 

 

用法一:
INSERT OVERWRITE TABLE tablename1 [PARTITION \
(partcol1=val1, partcol2=val2 ...) [IF NOT EXISTS]] \
select_statement1 FROM from_statement;
 
用法二:
INSERT INTO TABLE tablename1 [PARTITION \
(partcol1=val1, partcol2=val2 ...)] \
select_statement1 FROM from_statement;
 

Published 61 original articles · won praise 2 · Views 7302

Guess you like

Origin blog.csdn.net/hebaojing/article/details/105404686