表table

(一)创建表

create table if not exists mydb.employees(

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

)

上一篇:黑马程序猿——25,打印流,合并流,对象序列化,管道流,RandomAccessFile


下一篇:C#对象序列化与反序列化