default(0)改为  default 0

解决方案 »

  1.   

    应该在create table的时候指定default值的,或者add column的时候
      

  2.   

    default 0也不行啊,创建表时我也指定default值了,但还是不行啊..大哥再帮我看下..
      

  3.   

    举个例子:SQL> create table test(userid number);Table createdSQL> alter table test add usernum number default 0;Table altered
    SQL> insert into test(userid) values(1);1 row insertedSQL> commit;Commit completeSQL> select * from test;    USERID    USERNUM
    ---------- ----------
             1          0
      

  4.   

    定义表的时候指定default值了,insert的时候就不需要了啊,添加的时候自动赋值了
      

  5.   

    能不能直接在sqlldr中用一个什么函数实现啊?问了一下,数据库中没有插入默认值,数据库不是我建的,现在也不能改啊..大哥再帮我想想办法..谢谢..
      

  6.   

    可以insert的时候暂时不管这个字段值,之后再统一update,sql语句
      

  7.   

    不管还不行,因为我这一列还限制的not null麻烦您了..
      

  8.   

    最后不行,先不要强制not null
    再统一update
    再改回强制not null
      

  9.   

    先不要强制not null
    先insert
    再统一update
    再改回强制not null
      

  10.   

    不是,我没有按你说的"先不要强制not null
    先insert
    再统一update
    再改回强制not null"做..由于数据库我不能动,我只负责往数据库中导入数据..还是谢谢你了..
      

  11.   

    那么多的第三方工具,随意找一个,编辑好not nul列,然后导进去
      

  12.   

    try:CONSULT_STATUS default(0)   ->    CONSULT_STATUS nvl(null, 0)
      

  13.   

    CONSULT_STATUS "nvl(null, 0)"这样就OK了..