栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

oracle数据库基本知识

oracle数据库基本知识

-- 创建表空间
-- 表空间真实存在 所以要指定路径 
-- 分配存储大小

create tablespace tp_first datafile 'D:OracleTablespacetp_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;

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/742082.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号