库
创建库
CREATE DATABASE IF NOT EXISTS db01;
查看库
SHOW DATABASES;
使用库
USE db01;
删除库
DROP DATABASE db01;
表
查看表
SHOW TABLES;
创建分区表
CREATE TABLE IF NOT EXISTS tab_01 (colume01 string)
partitioned by (colume02 string)
row format delimited
fields terminated by '\t';
查看分区
SHOW PARTITIONS tab_01;
插入分区数据
INSERT INTO TABLE tab_01 partition(colume02='xxxx') VALUES ('yyyy');
查看分区数据
SELECT * FROM tab_01 WHERE colume02='xxxx';
网友评论