Home  >  Q&A  >  body text

Question about updating data in MySQL [update] cannot be successful

女神的闺蜜爱上我女神的闺蜜爱上我2672 days ago776

reply all(3)I'll reply

  • 三叔

    三叔2017-06-26 10:51:26

    Change to where id IS NULL That’s it
    The equal sign cannot be used to determine NULL in MySQL.

    For details, please see:
    https://dev.mysql.com/doc/ref...

    reply
    0
  • PHP中文网

    PHP中文网2017-06-26 10:51:26

    where id is null

    reply
    0
  • 代言

    代言2017-06-26 10:51:26

    General update statements, to be on the safe side, first verify the data volume and confirm the update content

    #update defaultdemo
    #set id = 19
    select id 
    from defaultdemo
    where id is null;

    reply
    0
  • Cancelreply