admin管理员组文章数量:1794759
oracle数据库基本知识
-- 创建表空间 -- 表空间真实存在 所以要指定路径 -- 分配存储大小
create tablespace tp_first datafile 'D:\\oracleTablespace\\tp_first01.dbf' size 60M;-- 删除
drop tablespace tp_first including contents;--赋予权限
grant connect,resource to test1;--赋予具体实体的操作权限
grant all on scott.student to test1;-- 创建序列 是独立存在的 -- currval 当前序列 nextval下一个序列
select seq_a.nextval from dual;-- 同义词 syn 可以简化表名称,并且使用
-- Create sequence create sequence SEQ_A minvalue 1 //最小值 maxvalue 1000 //最大值 start with 41 //起始位置 increment by 1 //增量 cache 20 cycle;-- 索引 一定要建立在大数据量的基础上才有用 --主键索引 唯一索引 反向键索引 位图索引 大写函数索引 -- 主键索引是主键自带的 -- 唯一索引
create unique index index_u_age on student(sage);--反向键索引
create index index_u_age on student(sage) reverse;--创建位图索引
create bitmap index index_u_age on student(sage);-- 针对函数建立索引
create index index_u_age on student(upper(sid));--删除索引
drop index index_u_age;版权声明:本文标题:oracle数据库基本知识 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686508274a75445.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论