ANY_VALUE
ANY_VALUEβ
ANY_VALUE
descriptionβ
Syntaxβ
ANY_VALUE(expr)
If there is a non NULL value in expr, any non NULL value is returned; otherwise, NULL is returned.
Alias function: ANY(expr)
exampleβ
mysql> select id, any_value(name) from cost2 group by id;
+------+-------------------+
| id | any_value(`name`) |
+------+-------------------+
| 3 | jack |
| 2 | jack |
+------+-------------------+
keywordsβ
ANY_VALUE, ANY