当前位置:Gxlcms > 数据库问题 > MySQL 批量更新数据

MySQL 批量更新数据

时间:2021-07-01 10:21:17 帮助过:5人阅读

语法:updat table_name  set

          column_name1  =  case   id

          when  1 then ‘a‘

          when  2 then  ‘b‘

          when  3  then  ‘c‘

          end,

         colunm_name = case   id

         when 1 then ‘d‘

         when 2  then ‘e‘

         when   3  then  ‘f‘

         end

       where id in (1,2,3)

技术图片

 

 

          

MySQL 批量更新数据

标签:tab   img   nbsp   ble   set   mic   inf   col   ase   

人气教程排行