-- Create table
create table TBL_ITEM_ESP
(
  ITEMNO varchar2(15) not null,
  DESC   varchar2(500),
  Mar    varchar2(2) default 0 not null
)
tablespace USERS
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 1M
    next 1M
    minextents 1
    maxextents unlimited
    pctincrease 0
  );
-- Grant/Revoke object privileges

解决方案 »

  1.   

    ORA-00904 string: invalid identifierCause: The column name entered is either missing or invalid.应该是desc字段名的问题,desc是保留字。
      

  2.   

    SQL> create table TBL_ITEM_ESP
      2  (
      3    ITEMNO varchar2(15) not null,
      4    DESC   varchar2(500),
      5    Mar    varchar2(2) default 0 not null
      6  )
      7  /
      DESC   varchar2(500),
      *
    ERROR 位于第 4 行:
    ORA-00904: : 无效的标识符看看报错时那个*号所在的位置,就知道哪里错了。DESC 是个保留字,不能用的。非要用的话,可以:SQL> create table TBL_ITEM_ESP
      2  (
      3    ITEMNO varchar2(15) not null,
      4    "DESC"   varchar2(500),
      5    Mar    varchar2(2) default 0 not null
      6  )
      7  /表已创建。
      

  3.   

    ORA-00904 string: invalid identifierCause: The column name entered is either missing or invalid.Action: Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in double quotation s. It may not be a reserved word.