书号       书名
005171 诗与诗人(一)
005172  诗与诗人(一)
005173 诗与诗人(一)
005174 诗与诗人(一)
请问如何将上面四笔书号改成一样的四笔书号,如下
005171 诗与诗人(一)
005171 诗与诗人(一)
005171 诗与诗人(一)
005171 诗与诗人(一)

解决方案 »

  1.   

    update 表 表1 set 书号 = 
    (select top 1 表2.书号 from 表 as 表2 where 表2.书名 = 表1.书名 order by 书号)
      

  2.   

    update tb
     set 书号='005171',书名='诗与诗人(一)'
      

  3.   

    上面打错了
    --
    update   表   set   书号   =   
    (select   top   1   表2.书号   from   表   as   表2   where   表2.书名   =   表.书名   order   by   书号)
      

  4.   

    update T 
    set 书号='005171' , 书名=N'诗与诗人(一)'
    where
    书名 like '%'+'诗与诗人(一)'
      

  5.   

    update t
    set  书号 = '005171'
    where  书号 between '005171' and '005174'
      

  6.   


    update       表       set       书号       =       
    (select       top       1       表2.书号       from       表       as       表2       where       表2.书名       =       表.书名       order       by       书号)
    -----------------
    满足不了你的要求?
      

  7.   

    csdn少见的帅哥:您的可以满足我^^