索引名称的唯一性
2016-04-15 16:40
274 查看
oracle的规定,在同一个SCHEMA下的对象是不能用相同的名字命名的,一般创建索引名用“表名_字段名”,这样能很快知道这个索引,是属于哪个表的。
col_index 在ORACLE中都叫对象,不能命名相同
例:
SQL> create table emp1 as select * from scott.emp;
Table created
SQL> create table emp2 as select * from scott.emp;
Table created
SQL> create index emp1_name_idx on emp1(ename);
Index created
SQL> create index emp1_name_idx on emp2(ename);
create index emp1_name_idx on emp2(ename)
ORA-00955: 名称已由现有对象使用
col_index 在ORACLE中都叫对象,不能命名相同
例:
SQL> create table emp1 as select * from scott.emp;
Table created
SQL> create table emp2 as select * from scott.emp;
Table created
SQL> create index emp1_name_idx on emp1(ename);
Index created
SQL> create index emp1_name_idx on emp2(ename);
create index emp1_name_idx on emp2(ename)
ORA-00955: 名称已由现有对象使用
相关文章推荐
- Git安装使用、Git 常用命令总结
- BZOJ4281: [ONTAK2015]Związek Harcerstwa Bajtockiego
- Java. Warning – Build path specifies execution environment J2SE-1.6
- 安卓获取地区信息
- phpstorm 2016.1注册码
- 前端-打印指定内荣容
- 一个优秀的程序员应该如何提高工作效率?
- CSS控制文本的长度 超过一行显示省略号的实现方法
- iOS 9.3 升级后无法真机测试 Could not find Developer Disk Image
- python 继承
- Android中GridView使用
- MFC 实现CUDA加速
- Centos创建用户、分配主目录、并加入sudo
- 单列设计模式的实现
- 最优二叉树——哈夫曼树
- 操作MongoDB中的一些问题
- JavaScript继承与原型链
- Java并发编程:Condition实现线程间协作
- 子数组问题2
- git使用