try:
update tbname set url='/app/news'
where url like '/app/news%';

解决方案 »

  1.   

    我还有一个表:
    url              name 
    /app/news        新闻是取出一条纪录后,与这个表中的所有url进行比较,如果符合匹配规则就用“新闻”替换,这样如何实现?谢谢
      

  2.   

    update tb1 set url=(select name from tb2
    where tb1.url like tb2.url||'%')
    where exists (select name from tb2
    where tb1.url like tb2.url||'%');
      

  3.   

    update tab_name set name='新闻' where url like 'app/news%'
      

  4.   

    to:bzszp(SongZip)
    按照你的方法,更新完之后,怎么少了很多纪录?