简体   繁体   English

范围函数的无效数据类型

[英]Invalid datatype for range function

I am trying to use range partition on a table for a column of type number.我正在尝试在表上使用范围分区作为类型号的列。 However, Oracle 12c throws an error saying it is an invalid data-type.但是,Oracle 12c 会抛出一个错误,指出它是无效的数据类型。 I don't understand why/what is invalid in the command.我不明白命令中为什么/什么是无效的。

create table partition_tester (
    some_column number not null,
    another_column varchar2(10),
    partition by range(some_column) interval(10)
);

I am connecting to the database using SQL developer.我正在使用 SQL 开发人员连接到数据库。 It seems to have issue with the range function.范围函数似乎有问题。 On executing above script it throws:在执行上面的脚本时,它会抛出:

Error report -
ORA-00902: invalid datatype
00902. 00000 -  "invalid datatype"
*Cause:    
*Action:

Any help is appreciated.任何帮助表示赞赏。

remove the comma after " another_column varchar2(10)," and specify at least one partition.删除“another_column varchar2(10)”后的逗号,并指定至少一个分区。

create table partition_tester (
    some_column number not null,
    another_column varchar2(10))
    partition by range(some_column) interval(10)
    (   
       partition p0 values less than (10) 
    )

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM