一、创建数据库
create database python;
create database python_db comment 'python_database' with dbproperties('name'='python');
create database python_location location '/ming';
二、数据库查看
-
查看数据库详情
describe database extended python;
-
显示建库语句
show create database python_db;
三、数据库删除
-
数据库没有数据
drop database python_db;
-
数据库中有数据
drop database python cascade;
四、数据库修改
-
修改属性值
alter database python set dbproperties('age'=18); alter database python set location 'hdfs:///user/hive/ware/house/python.db';
-
修改拥有者
alter database python set owner user python;