日期:2014-05-17  浏览次数:20750 次

一条简单的sql语句
create cluster index EVA on evaluate(tno);
如上语句,这里我想为evaluate创建一个索引,但是报错了。报的错误为ORA-00941:缺失索引

------解决方案--------------------
想创建什么索引?

一般索引 这样就可以了 create index EVA on evaluate(tno);
------解决方案--------------------
对的,一般就用楼上的语句,楼主失败的原因应该是系统不认cluster这个词(cluster貌似是SQL SERVER使用的,ORACLE则不同),create后应该以index或其他词继续,如果不是有很特殊的需求,就使用楼上的语句好了
------解决方案--------------------
create cluster e_d_cluster (deptid number(2));
create index e_d_cluster_idx on cluster e_d_cluster;

oracle 的cluster index是这么弄的