ORA-00945:指定的聚集列不存在

时间:2019-07-19 17:46:36

标签: sql oracle

这是包含集群的代码,永远不会创建表,并且oracle文档是驴子

create cluster c123 (a integer)
size 512;
/

drop table t123;
/

create table t123
cluster c123 (b)
as SELECT t1.col1 FROM T1, T2, T3
WHERE T1.col1=T3.col11 AND
T2.col1=T3.col12 AND T1.col2=1;
/

它需要创建表,而不是我不断获取

...
Error report -
ORA-00945: specified clustered column does not exist
00945. 00000 -  "specified clustered column does not exist"
*Cause:    
*Action:

1 个答案:

答案 0 :(得分:1)

您可以添加别名:

create table t123
cluster c123 (b)
as 
SELECT t1.col1 AS b
FROM T1
JOIN T2 ON T1.col1=T2.col11
JOIN T3 ON T2.col1=T3.col12
WHERE T1.col2=1;