本文共 450 字,大约阅读时间需要 1 分钟。
创建外部表
删除表后数据删除,元数据还在
create EXTERNAL(外部表) table 表名称(字段信息)row format delimited fields terminated by '分隔符' lines terminated by '\n'
创建管理表
删除表后数据删除,元数据也删除
create table 表名称(字段信息)row format delimited fields terminated by '分隔符' lines terminated by '\n'
create table 新建表名称row format delimited fields terminated by '分隔符'as select 字段 from 需要查询的表名
需要一张被复制的表:表结构相同,没有数据
create table 新建表名称 like 目标表名称
字段之前的间隔符号不是必须指定的
转载地址:http://lrxmb.baihongyu.com/