MYSQL数据库的创建
-- 创建表: student_info 属主: root(默认当前用户)
create table root.student_info (
id number(10) constraint pk_si_sno primary key,
scname varchar2(10),
csex varchar2(2),
create_date date
);
-- 添加注释
comment on table root.student_info is '学生信息表';
comment on column root.student_info.id is '学号';
comment on column root.student_info.scname is '姓名';
comment on column root.student_info.scex is '性别';
comment on column root.student_info.create_date is '创建日期';
-- 语句授权,如:给 hr 用户下列权限
grant select, insert, update, delete on root.student_info to hr;