In Hive and MySQL, the select statement having <value/col_name> as <col_alias> and <value/col_name> <col_alias> gives the same output. as is optional keyword.
Below examples may clarify better:
Hive query
MySQL query
In other databases also it may follow the same rule.
0
votes
Both are the same. They can be tested this way:
select *
from (
select NULL col1, NULL as col2
from test_nulls ) tabl
where col1 is NULL and col2 is NULL;
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more