注意:在phoenix中,schema名,表名,字段名等会自动转换为大写,若要小写,使用双引号,如"student"。
create table if not exists table_name(
id varchar primary key,
name varchar,
addr varchar
);
<!--注意:这里的key对应hbase中的rowkey-->
<!--在phoenix中使用upsert进行插入和修改操作-->
upsert into table_name values(‘1001‘,‘zhangsan‘,‘beijing‘);
select * from table_name;
select * from table_name where name=‘zhangsan‘;
delete from table_name where id=‘1001‘;
drop table table_name;
!quit
原文:https://www.cnblogs.com/HYBG-JXMD/p/14945285.html