【发布时间】:2012-07-23 16:07:20
【问题描述】:
我正在使用 Oracle 10 g。
我有一个需要Long 类型的两列的表:
CREATE TABLE emp
(
id1 LONG NULL,
id2 LONG NULL,
//
// Other columns.
);
当我执行这个查询时,它给了我这个错误:
Error report:
SQL Error: ORA-01754: a table may contain only one column of type LONG
01754. 00000 - "a table may contain only one column of type LONG"
*Cause: An attempt was made to add a LONG column to a table which already
had a LONG column. Note that even if the LONG column currently
in the table has already been marked unused, another LONG column
may not be added until the unused columns are dropped.
*Action: Remove the LONG column currently in the table by using the ALTER
TABLE command.
我在 Google 上进行了搜索,但找不到合适的解决方案。为什么他们不允许两列LONG?
使用number 代替列是个好主意吗?
我怎样才能做到这一点?
【问题讨论】:
-
如果您已经在修改 Quartz 表,您可能还想将 VARCHAR 更改为 VARCHAR2。他们的表格脚本有一些问题。
标签: sql oracle sqldatatypes