书号 书名
005171 诗与诗人(一)
005172 诗与诗人(一)
005173 诗与诗人(一)
005174 诗与诗人(一)
请问如何将上面四笔书号改成一样的四笔书号,如下
005171 诗与诗人(一)
005171 诗与诗人(一)
005171 诗与诗人(一)
005171 诗与诗人(一)
005171 诗与诗人(一)
005172 诗与诗人(一)
005173 诗与诗人(一)
005174 诗与诗人(一)
请问如何将上面四笔书号改成一样的四笔书号,如下
005171 诗与诗人(一)
005171 诗与诗人(一)
005171 诗与诗人(一)
005171 诗与诗人(一)
(select top 1 表2.书号 from 表 as 表2 where 表2.书名 = 表1.书名 order by 书号)
set 书号='005171',书名='诗与诗人(一)'
--
update 表 set 书号 =
(select top 1 表2.书号 from 表 as 表2 where 表2.书名 = 表.书名 order by 书号)
set 书号='005171' , 书名=N'诗与诗人(一)'
where
书名 like '%'+'诗与诗人(一)'
set 书号 = '005171'
where 书号 between '005171' and '005174'
update 表 set 书号 =
(select top 1 表2.书号 from 表 as 表2 where 表2.书名 = 表.书名 order by 书号)
-----------------
满足不了你的要求?