本帖最后由 hc1104 于 2011-09-10 00:55:54 编辑

解决方案 »

  1.   

    create table tb(stu_ID varchar(8),stu_Year smallint)
    goinsert into tb values('001',3)select * from tbdrop table tb/*
    stu_ID   stu_Year 
    -------- -------- 
    001      3(所影响的行数为 1 行)
    */
      

  2.   

    你的插入语句,最好把001 -- > '001',否则就成如下了.create table tb(stu_ID varchar(8),stu_Year smallint)
    goinsert into tb values('001',3)
    INSERT INTO tb VALUES(001,3)select * from tbdrop table tb/*
    stu_ID   stu_Year 
    -------- -------- 
    001      3
    1        3(所影响的行数为 2 行)
    */
      

  3.   

    注意你的stu_ID数据类型,字符串插入要加引号。
      

  4.   

    insert into tb values('001',3)
      

  5.   

    引号加了..
    为什么还是不行..
    如果我只操作这2列的数值没问题.但是多了 就出问题了.
    INSERT INTO student_Info (student_ID,student_Name,student_Sex,born_Date,depart_ID,class_NO,tele_Number,entr_Date,stu_Year,edu_bg,address,codeNo,zzmm,comment)  VALUES ( 'o111','hc','女','1990-1-1',333,333,222222,'2000-1-1',3,'123', 123,'123','群众','123')
    stu_Year smallint类型.(0 行受影响)(1 行受影响)(7 行受影响)(1 行受影响)
      

  6.   

    我在一楼已经帮你测试成功了.
    再帮你加一列.
    create table tb(stu_ID varchar(8),stu_Year smallint , tt smallint)
    goinsert into tb values('001',3 , 1)select * from tbdrop table tb/*
    stu_ID   stu_Year tt     
    -------- -------- ------ 
    001      3        1(所影响的行数为 1 行)
    */自己好好检查一下吧.