(一)创建表

create table if not exists mydb.employees(

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

name string comment "employee name",

salary folat comment "employee salary",

subordiantes array<string> comment"names of subordiantes",

deductions map<string,float> comment "keys are deductions name,values are percentages",

address struct<street:string,city:string,state:string,zip:int> comment "home address")

comment "description of the table"

tblproperties("creator"="me","created_at"="2012-01-02")

location "/user/hive/warehouse/mydb.db/employees";

(二)拷贝表

create table if not exists mydb.employee2 like mydb.employees;

(三)

show tables in mydb;

show tables "empl.*"

describe extended mydb.employees

 

 

 

 

)

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄