Mysql update 一个表中自己的数据


update  table ucf,

            table t2

                set ucf.pcid = t2.pcid

    where

           t2.name = 'liming'

    and t2.gid= ucf.gid

    and ucf.id in(474,475,479,482,457,375,461,406,373,374);

原文地址:https://www.cnblogs.com/cbugs/p/6764105.html