Notes
P.S. : all the sql codes in this note are based on hive sql , so may be a little different with 61a sql part, mysql,oracle,etc.
most of the content in this note is based on my work experiences.JUST A RECORD
Executing order of SQL
Bacis syntax
CREATE
- CREATE (TEMP or TEMPORARY) TABLE table_name (data) ;
- CREATE (TEMP or TEMPORARY) TABLE table_name AS SELECT … ;
INSERT
- INSERT INTO table_name VALUES() ;
- INSERT OVERWRITE table_name VALUES() ;
- For partitioned tables, the insert overwrite table operation overwrites the data in the specified partition without affecting the data in other partitions.
- **INSERT OVERWRITE TABLE table_name PARTITION(target_partition) SELECT … **
- For a normal table (that is, a non-partitioned table), the insert overwrite table operation completely overwrites

最低0.47元/天 解锁文章
3593

被折叠的 条评论
为什么被折叠?



