ANY_VALUE

SinceVersion 1.2.0

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

  1. mysql> select id, any_value(name) from cost2 group by id;
  2. +------+-------------------+
  3. | id | any_value(`name`) |
  4. +------+-------------------+
  5. | 3 | jack |
  6. | 2 | jack |
  7. +------+-------------------+

keywords

ANY_VALUE, ANY