SQL> create table yangou(
  2  id int(32) not null primary key,
  3  name varchar(30) not null);id int(32) not null primary key,
      *
ERROR 位于第 2 行:
ORA-00907: 缺少右括号
这是我的建表代码,刚学oracle,请大家帮忙,谢谢
create table yangou(
  2  id varchar(32) not null primary key,
  3  name varchar(30) not null);如果是这样的,就没有错误.

解决方案 »

  1.   

    int是没有后面的长度限制的
    可以用NUMBER(32)
      

  2.   

    什么呀?不就点分麻,搞定了马上给。我编写pojo类时,在myecplise中提示说number这个类不能解析。private number id;
    这样定义不行,应该怎么办呢?
      

  3.   

    在那里要用 private int id;
      

  4.   

    假设我在oracle中建个表,但是我是用hibernate通过操作操作和这个表相对应的类,来实现对数据的操作,所以在pojo类中就要用到id 假设类名是Yangou
    public class Yangou 
    {
       private number id;
       private String name;
       //下面是get and set方法 
    }
      

  5.   

    myecplise提示说number不能被解析为一个类型