本帖最后由 peinet 于 2012-08-23 09:22:31 编辑

解决方案 »

  1.   

    INSERT INTO chardata (
    accountid, 
    `level`, 
    sex, 
    headimg, 
    action_id,
    race, 
    currentexperience, 
    job_id, 
    attr_bear, 
    attr_soma, 
    attr_unreal, 
    attr_force, 
    attr_virtuous, 
    attr_refined, 
    attr_speed, 
    attr_impress, 
    hp, 
    mp, 
    perception, 
    pos_x, 
    pos_y, 
    faceto) VALUES  
    (17,0,0,2,6,4,0,1,
    0,0,0,0,0,0,0,0,
    1000,500,0,156,591,1);
    SHOW WARNINGS;
    Level Code Message
    Warning 1364 Field 'dbid' doesn't have a default value
    Warning 1364 Field 'name' doesn't have a default value
    Warning 1364 Field 'evil' doesn't have a default value
      

  2.   

    把双引号去掉mysql> insert into chardata (
        -> accountid, 
        -> level, 
        -> sex, 
        -> headimg, 
        -> action_id,
        -> race, 
        -> currentexperience, 
        -> job_id, 
        -> attr_bear, 
        -> attr_soma, 
        -> attr_unreal, 
        -> attr_force, 
        -> attr_virtuous, 
        -> attr_refined, 
        -> attr_speed, 
        -> attr_impress, 
        -> hp, 
        -> mp, 
        -> perception, 
        -> pos_x, 
        -> pos_y, 
        -> faceto) values  
        -> (17,0,0,2,6,4,0,1,
        -> 0,0,0,0,0,0,0,0,
        -> 1000,500,0,156,591,1);
    Query OK, 1 row affected, 3 warnings (0.00 sec)