Problem beim Schreiben der Mybatis SQL-Anweisung

1. SQL logisch löschen

  Kontakte aktualisieren set status = '2' wobei id = # {id}

2. Multi-Condition Update SQL

  Kontakte aktualisieren 
  < set>
  < if test = "name! = null">
   name = # {name},
  </ if>
  < if test = "phone! = null">
  phone = # {phone}
  </ if>
  </ set>
  where id = # {id}

3. Multi-Condition-Abfrage SQL

  Wählen Sie * aus Kontakten mit id = # {id} und status = '1'.

  

Ich denke du magst

Origin www.cnblogs.com/hy-smart/p/12710208.html
Empfohlen
Rangfolge