偶用的是Oracle 10.1 G,遇到以下问题,调试了很久,就是调不成功,请求网友帮忙!SQL> CREATE TABLE person (
  2   pid  VARCHAR2(18),
  3   name  VARCHAR2(200),
  4   age  NUMBER(3),
  5   birthday DATE,
  6   sex  VARCHAR2(2) DEFAULT '男'
  7  );
 sex  VARCHAR2(2) DEFAULT '男'
                          *
第 6 行出现错误:
ORA-01401: 插入的值对于列过大

解决方案 »

  1.   

    SQL> CREATE TABLE person (
      2      pid  VARCHAR2(18),
      3     name  VARCHAR2(200),
      4      age  NUMBER(3),
      5      birthday DATE,
      6      sex  VARCHAR2(2) DEFAULT '男'
      7      );表已创建。
    没错啊,是不是你多加了空格哦,成了这样' 男'
      

  2.   

    The VARCHAR2 and CHAR types support two methods of specifying lengths:
    • In bytes: VARCHAR2(10 byte). This will support up to 10 bytes of data, which could be as few as two characters in a multibyte character set.• In characters: VARCHAR2(10 char). This will support to up 10 characters of data, which could be as much as 40 bytes of information.
      

  3.   

    ORA-01401: inserted value too large for column 
    Cause: The value entered is larger than the maximum width defined for the column. 
    Action: Enter a value smaller than the column width or use the MODIFY option with ALTER TABLE to expand the column width.  
    楼主的SQL是没有问题的,我执行也通过了. 要不楼主把
    sex  VARCHAR2(2) DEFAULT '男' 
    ==》sex  VARCHAR2(4) DEFAULT '男'
    试试.. 
      

  4.   

    lz看下这个帖子,
    http://www.cnblogs.com/QQParadise/articles/1511886.html