-------------------------------------------创建一个外部表-----------------------------------------
create external table if not exists employee_external(
name string,
work_place array<string>,
sex_age struct<sex:string,age:int>,
skills_score map<string,int>,
depart_title map<string,array<string>>)
comment 'this is an external table'
row format delimited
fields terminated by '|'
collection items terminated by ','
map keys terminated by ':'
stored as textfile;
//DDL
create table cte_score as with
r1 as (select sclass from r2 where sno =108 ),
r2 as (select * from score where sno > 105),
r3 as (select sclass from score where sno <106)
select * from r1 union all select * from r3;
create table score_like like score;
drop view score4;
drop table score_like;
--查看