达梦数据库 随笔
时间 2021-08-12
标签
ide
spa
table
class
date
file
select
权限
next
建立表空间
文件路径:/dm7/data/PROD/tbs1_01.dbf
初始大小:128M
每次自动扩充:8M;
最大尺寸:20G
create tablespace tbs1 datafile '/home/dm8/data/PROD/tbs1_01.dbf' size 128 autoextend on next 8 maxsize 20480;
建立用户
CREATE USER "YSADMIN" IDENTIFIED BY "123456789" DEFAULT TABLESPACE "MOOC" ;
给权限
GRANT create table,select table,update table,insert table TO YSADMIN;
GRANT DBA TO YSADMIN;
建立表
create table YSADMIN.PERSON
(
id INT IDENTITY(1,1) PRIMARY KEY,
name VARCHAR(60) NOT NULL,
address VARCHAR(60),
age int
) STORAGE (on MOOC);