English 中文(简体)
Oracle10g XE: Why PLS_INTEGER cannot be a column type
原标题:
  • 时间:2009-11-20 03:59:37
  •  标签:
  • oracle10g

An invalid datatype is returned when I issue following command:

CREATE TABLE msg_info (
   msgcode PLS_INTEGER,
   msgtype VARCHAR2(30),
   msgtext VARCHAR2(2000),
   msgname VARCHAR2(30),
   description VARCHAR2(2000)
   );

I discovered it s resulted from msgcode PLS_INTEGER, removing this column will make creation successful.

Is it XE restriction? Thanks.

最佳回答

PLS_INTEGER is a PL/SQL type only. It cannot be used in SQL tables / DDL-at-large.

I think one should declare the column as NUMBER type and, when retrieving data, use the PLS_INTEGER type at the level of PL/SQL.

See Oracle Datatypes

问题回答

Try BINARY_INTEGER - it s identical and can be used interchangeably with PLS_INTEGER

link





相关问题
Oracle10g XE: Why PLS_INTEGER cannot be a column type

An invalid datatype is returned when I issue following command: CREATE TABLE msg_info ( msgcode PLS_INTEGER, msgtype VARCHAR2(30), msgtext VARCHAR2(2000), msgname VARCHAR2(30), ...

DMBS_SQL.to_refcursor equivalent in Oracle 10g

I have a coworker who came across DBMS_SQL.to_refcursor which would be a great solution for him to pass back the refcursor he needs, however we are running Oracle 10g and this feature is only ...

难以执行 REGEXP_SUBSTR

I m 查询Oracle 10g。 我有两张表格(样本数据见下文)。 i m 试图提取一些领域

Oracle: LONG RAW to?

I am writing a program in java where I need to create a copy of a table (without data). for that I am using the following query CREATE TABLE NEW_TABLE AS SELECT * FROM OLD_TABLE I have come across a ...

Oracle REPLACE function - unsure how to use for my scenario

I have a column called THE_VALUE in a table TABLE_A, that holds data similar to the following, i.e a few sample rows might be: tom:harry, sally, jeff state(vic,nsw), england, qwerty(aaa,bbb, cccc):...

热门标签