15.10 - Comparison of JSON_AGG and JSON_COMPOSE - Teradata Database

Teradata Database Teradata JSON

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1150-151K

JSON_AGG and JSON_COMPOSE are similar functions that take a variable number of input parameters and packages them into a JSON document. Both commands use the same syntax and input parameters.

The difference is JSON_AGG is an aggregate function and JSON_COMPOSE is a scalar function. JSON_COMPOSE can call JSON_AGG to provide a more complex composition of a JSON document than the JSON_AGG function can do by itself.