For example, there is such a SQL query, example:
update house_rooms set is_closed = 1 and is_empty = 1 where owner_id = ? and status = ? It was created for an example. You shouldn’t look for logic in it, the problem is that it works, but it shouldn’t be because the set syntax is incorrect, that is, if you replace:
set hr.is_closed = 1 and hr.is_empty = 1 On line:
set hr.is_closed = 1, hr.is_empty = 1 Then it runs and changes values.
The question itself: why does not it give an error, but shows that the request worked?
BD: MariaDB 10.2, but I think it will not affect the answer.
1 and is_empty = 1legal boolean expression and its result is assignedis_closed- Yura Ivanov