oracle可以在建表的时候建立索引
create table test  (
   col1 VARCHAR2(10) not null,
   constraint PK_test primary key (col1)
);    

解决方案 »

  1.   

    id int not null,
     结尾应该是逗号,你的是分号,
    你的报错应该说的就是这个
      

  2.   

    id int not null,
     结尾应该是逗号,你的是分号,
    你的报错应该说的就是这个
    -------------------------------
     正解
      

  3.   

    oracle9I以后可以在建表的时候建立索引,楼主的语法有错误!
      

  4.   

    create table test(
       id int not null,
       pid int,
       fid int,
       constraint pk_pr primary KEY(id)
    );不过个人认为还是改int为number
      

  5.   

    id int not null,
     结尾应该是逗号,你的是分号,
    你的报错应该说的就是这个-------------------------
    我只是写这贴的时候打错了,而且报错是
    "KEY pid(pid),
              *ERROR at line 6: 
    ORA-00907: missing right parenthesis"