ALTER TABLE "yourtable" ADD ( CONSTRAINT PK_NAME PRIMARY KEY( "NUMBER_PLATE", "YEAR_MONTH" )) ;

解决方案 »

  1.   

    ALTER TABLE "yourtable" ADD ( CONSTRAINT PK_NAME PRIMARY KEY( "NUMBER_PLATE", "YEAR_MONTH" )) ;
    ------"NUMBER_PLATE", "YEAR_MONTH" 是什么意思?我这样写的,但是出错:
    SQL> alter table student add(constraint primary key (stuid));
    alter table student add(constraint primary key (stuid))
                                                   *
    ERROR 位于第 1 行:
    ORA-00902: 无效数据类型应该怎么写呢?谢谢!!
      

  2.   

    alter table student add(constraint pk_stuid primary key (stuid));
    你少了个名字,可以随便起的.
      

  3.   

    alter table student add(constraint---这里少了 pk_name --- primary key (stuid))