lundi 22 février 2016

IF THEN on multiple table field

I have table with some int fields. I need to check values in those field in manner:

IF field1 = 0 THEN status = 0
ELSE if field2 = 1 THEN status = 3
ELSE IF field3 = 1 THEN status = 4

Is it possible to do that in mySQL and how?

Aucun commentaire:

Enregistrer un commentaire