Heim  >  Fragen und Antworten  >  Hauptteil

Frage zum Aktualisieren von Daten in MySQL [Update] kann nicht erfolgreich sein

女神的闺蜜爱上我女神的闺蜜爱上我2672 Tage vor780

Antworte allen(3)Ich werde antworten

  • 三叔

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

    改为 where id IS NULL 即可
    MySQL里面不能用等号判断NULL。

    详见:
    https://dev.mysql.com/doc/ref...

    Antwort
    0
  • PHP中文网

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

    where id is null

    Antwort
    0
  • 代言

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

    一般更新语句,保险起见,先验证下数据量及确认下更新内容

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

    Antwort
    0
  • StornierenAntwort