update biao set bb=cc where sex=女 and id in (select * from biao)不知道行不行

解决方案 »

  1.   

    select top 1 * from biao
      

  2.   

    你怎么确定第一个女的记录啊?随机找?如果是那样的话,其实也就是随便改哪条记录,只要它的sex=‘女’?
      

  3.   

    update biao set bb=cc where sex=女 and id=(select top 1 id from biao)ID是表的主键
      

  4.   

    update biao set bb=cc where id=(select top 1 id from biao where sex='女')
      

  5.   

    update biao set b.bb=cc 
      from (select top 1 * from biao where  sex=女) a, biao b
      where a.主键 = b.主键 
      

  6.   

    那就随便取一条咯update biao set bb=cc where EXISTS(select top 1 * from biao where sex='女' order by newid())