dimanche 27 janvier 2019

if with multiple values (TSQL)

I'm newbie in SQL and i don't understand how this language work I have a code:

if (select Zarobki from PRACOWNICY) < 3000
    update PRACOWNICY set Zarobki = Zarobki * 2
else
    update PRACOWNICY set Zarobki = Zarobki / 2

How I can compare multiple values form table? I think select work like loop statements

Aucun commentaire:

Enregistrer un commentaire