hive建表语句DML:https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable 创建表: hive> CREATE TABLE pokes (foo INT, bar STRING); Creates a table called pokes with two columns, the first being an integer and…
A: create table a1 like a; insert into a1 as select * from a; B: create table b1 as select * from b; 测试AB两种建表语句对原始表的影响.其中a.b的数据量均为300000 rows. 如果使用A种方式建表,insert过程可能会堵塞DML操作 如果使用B中方式建表,此建表过程全程锁表: 建议:生产环境使用A种方式建备份表:…
-- 只复制表结构 create table city1 like city; INSERT INTO test2 SELECT * FROM test; -- 上面的表必须存在 -- 复制整张表的数据 create table test2 select * from test -- create database xxx charset-- create table xxx (id int,xxxxxx)-- drop table-- drop database-- al…