加入数据库中有一学生表,表中有username,userpwd,realname,province,city字段(其中username为关键字).现在表中已经有三个用户(比如username分别为u1,u2,u3).现在要把realname,province,city信息添加到u1用户中,请问怎样实现?

解决方案 »

  1.   

    insert into 你的表名(realname,province,city) values('','','') where username=u1
      

  2.   

    update 学生表 
    set realname='xxxx',
    province='xxxx',
    city='xxxx'
    where username='xxx';
      

  3.   

    update 学生表 set realname='你的值',province='你的值',city='你的值' where username='u1'
      

  4.   

    只能用update 修改 不能插入
    你可以用数据集 然后在datatable 中 add一个row
    然后再对它更新
      

  5.   

    update 学生表 set realname='你的值',province='你的值',city='你的值' where username='u1'
      

  6.   

    SQL codeupdate 学生表 set realname='你的值',province='你的值',city='你的值' where username='u1'
      

  7.   

    update 学生表 set realname='你的值',province='你的值',city='你的值' where username='u1'insert???没用过
      

  8.   

    update 学生表 set realname='你的值',province='你的值',city='你的值' where username='u1'
      

  9.   

    update 学生表 set realname='yourvalue',province='yourvalue',city='yourvalue' where username='u1'
      

  10.   

    Update 学生表 set realname='values',province='values',city='values' where username='u1'
      

  11.   

    insert to ,update都可以的。
      

  12.   

    insert into 你的表名(realname,province,city) values('','','') where username=u1
    这个好