valueinserted()

Aggregate. Returns a value including NULLS, from a group based on the last row applied into that group.

Syntax

valueinserted ( expression )

Parameters

expression

The expression accepts all datatypes.

Usage

This function returns the value of the expression computed using the most recent event used to insert/update the group.  If the current event removes a row from the group then it returns a NULL.

This function is considered an additive function.  Using only additive functions in the projection of a SELECT statement allows the server to optimize the aggregation, which results in greater throughput and lower memory utilization.