MSSQL:
update t set col=replace(col,'北京','上海')

解决方案 »

  1.   

    ACCESS  also:
    update t set col=replace(col,'北京','上海')
      

  2.   

    select @表=name from sysobjects where xtype='u' 找出所有表建游标
    select * from syscolumns where id=@id 找出所有字段
    之后游标实现
    update @biao set @id=replace(@zd,'北京','上海')
      

  3.   

    ACCESS中不会,SQL中用一游标就行了
      

  4.   

    declare tb cursor local for
    select N'update '+quotename(o.name)
    +' set '+quotename(c.name)
    +'=replace('+quotename(c.name)
    +',N''北京'',N''上海'') where '
    +quotename(c.name)+' like N''%北京%'''
    from sysobjects o,syscolumns c,systypes t
    where o.id=c.id 
    and c.xtype=t.xtype
    and objectproperty(o.id,N'IsUserTable')=1
    and t.name like '%char'
    declare @s nvarchar(4000)
    open tb
    fetch tb into @s
    while @@fetch_status=0
    begin
    exec(@s)
    fetch tb into @s
    end
    close tb
    deallocate tb
      

  5.   

    ACCESS估计得在前台程序中去遍历表和字段才行