这是我在oracle中创建表的sql语句create table xs_kch
(
xh char(6) not null,
kch char(6) not null,
cj number(2) null,
xf number(2) null,
constraint "pk_xs_kc" primary key("xh","kch")
tablespace mytablespace
);系统提示:缺少右括号。
这是怎么回事呢?请各位高手帮忙看看,谢谢!

解决方案 »

  1.   

    create table xs_kch
    (
    xh char(6) not null,
    kch char(6) not null,
    cj number(2) null,
    xf number(2) null,
    constraint "pk_xs_kc" primary key(xh,kch)
    )
    tablespace mytablespace
      

  2.   

    create table xs_kch 

    xh char(6) not null, 
    kch char(6) not null, 
    cj number(2) null, 
    xf number(2) null, 
    constraint pk_xs_kc primary key(xh,kch) 
    )
    tablespace mytablespace;
      

  3.   

    create table xs_kch 

    xh char(6) not null, 
    kch char(6) not null, 
    cj number(2) null, 
    xf number(2) null, 
    constraint "pk_xs_kc" primary key(xh,kch) 
    )
    tablespace mytablespace  
      

  4.   

    tablespace mytablespace 应该在括号外面
      

  5.   

    create table xs_kch 

    xh char(6) not null, 
    kch char(6) not null, 
    cj number(2) null, 
    xf number(2) null, 
    constraint pk_xs_kc primary key(xh,kch) 
    )
    tablespace mytablespace;二楼正解。