hive创建表并指定列分隔符的正确的HQL是( )。
A: create table dbtest(id int, name string) row format delimited terminate by ',';
B: create table dbtest(int id, string name) row format delimited by ',';
C: create table dbtest(id int, name string) row format delimited fields terminated by ',';
D: create table dbtest(int id, string name) row format delimited columns fields terminated by ',';
A: create table dbtest(id int, name string) row format delimited terminate by ',';
B: create table dbtest(int id, string name) row format delimited by ',';
C: create table dbtest(id int, name string) row format delimited fields terminated by ',';
D: create table dbtest(int id, string name) row format delimited columns fields terminated by ',';
举一反三
- hive里创建表test,表里添加两个字段id和name,以下哪个HQL是正确的( ) A: create test(id int, name string); B: create test(int id, string name); C: create table test(int id, string name); D: create table test(id int, name string)
- 下来定义表的约束语法,错误的是() A: create table t1(id number primary key,name varchar2(10)) B: create table t1(id number constraint p_k primary key(id),name varchar2(10)) C: create table t1(id number constraint p_k primary key,name varchar2(10)) D: create table t1(id number,name varchar2(10),primary key(id))
- 下列关于主键约束的语句哪个不正确 A: CREATE TABLE STU(no INT PRIMARY KEY,name VARCHAR2(20)) B: CREATE TABLE STU(no INT,name VARCHAR2(20),PRIMARY KEY(no)) C: CREATE TABLE SCORE(sno INT,cno INT,score INT,PRIMARY KEY(sno,cno)) D: CREATE TABLE SCORE(sno INT PRIMARY KEY,cno INT PRIMARY KEY,score INT)
- 创建表book(id,name,price),其中id为主键。create table book(id varchar __________ not null,.....);横线里进行填空。
- 有如下数据表create table student(name varchar(10),gender varchar(10),number varchar(10),)charset utf8;现要给学生表增加ID(int)放到name后的位置,语句为?