An invalid datatype is returned when I issue foll开发者_JS百科owing 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
精彩评论