oracle table

来源:互联网 发布:淘宝上好玩的男生玩意 编辑:程序博客网 时间:2024/05/22 05:01
 

grant all  on book to tt with grant option  对象授权

grant create user to test with admin option  系统授权

create user gg identified by bb

角色授权

create role myrole

grant select on tt.emp to myrole;

grant myrole to test

则test 可能查寻tt.emp

 

创建表空间:

   create tablespace tabs

   datafile 'c:/oracle/namefile.dbf'

   size 10m;

alter user test default tablespace tabs;

connect test/test111

conn / as sysdba

grant unlimited tablespace,dba to test;

grant table ty(id varchar2(10),...) tablespace tt

 

主键约束,实体约束

 

索引:

create index my_mm_idx on book(id);

值多,提高查寻速度

create bitmap index my_mm_idx on book(sex)

唯一索引:

create unique index my_mm_idx on book(sex)