vendredi 28 juillet 2017

how can i make an if and else mysql query

i have a question - i want to make a if else query in a mysql query. Unfortunately I do not know how to do it right - can someone please explain?

how can i make a query like this:

if s_table.example1 = s_table.example2
set .s_table.example1 = 1
else
set .s_table.example1 = 2
end if

Aucun commentaire:

Enregistrer un commentaire