★假设有一张表ttable iddomai...... 假设有一张表 ttable id domain1 domain2 1 abc.com test.abc.com 2 eee.com a.eee.com update ttable set domain2=REPLACE(domain2,domain1,'test1.com'),domain1='test1.com' where id=1 update ttable set domain1='test1.com', domain2=REPLACE(domain2,domain1,'test1.com') where id=2 将会有什么样的结果呢? id domain1 domain2 1 test1.com test.test1.com 2 test1.com a.eee.com id=2的记录为什么REPLACE无效了呢? 那是因为domain1在REPLACE之前, 已经由eee.com更新成了 test1.com, 所以REPLACE就无效了. |
|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )
GMT+8, 2024-9-29 23:34 , Processed in 0.135951 second(s), 13 queries , Gzip On, MemCache On.
Powered by Discuz! X3.5
© 2001-2023 Discuz! Team.