Vote count: 0
After executing the following query in MySQLWorkbench, only the first row was returned.
select * from (
select true as a
union select false as a
union select null as a
) x
where a
My takeaway from this is that rows such that the query's where
clause evaluates to null
will be filtered out. However, I could not find documentation of this behavior, so I wanted to check whether I can assume this behavior will always occur before writing queries that rely on it. Hence,
-
Will this behavior always occur, and if so,
-
Is there documentation of that?
asked 19 secs ago
Rows for which the WHERE condition evaluates to NULL?
Aucun commentaire:
Enregistrer un commentaire