0

How to update a column using multiple conditions ?

If there are multiple conditions for any entity how can I update that? For Example: update all the student's mark and add 5 mark extra who attend classes more than 90% and have more than 60% marks.

19th Dec 2016, 11:51 PM
Md. Omar Sohrab Hossain
Md. Omar Sohrab Hossain - avatar
2 Respostas
+ 1
UPDATE students SET marks = marks+5 WHERE attendance > 90 AND marks > 60
20th Dec 2016, 1:44 AM
lowshuen
+ 1
UPDATE table_name set column_name=value where condition1 AND condition1 AND ....
22nd Jan 2017, 5:49 AM
mohammad Shojaeinia
mohammad Shojaeinia - avatar