## Aggregation of JSON Values 

For aggregation of JSON values, SQL NULL  values are ignored as for other data types. Non- NULL  values are converted to a numeric type and aggregated, except for MIN() , MAX() , and GROUP_CONCAT() . The conversion to number should produce a meaningful result for JSON values that are numeric scalars, although (depending on the values) truncation and loss of precision may occur. Conversion to number of other JSON values may not produce a meaningful result. 

## 11.6 Data Type Default Values 

Data type specifications can have explicit or implicit default values. 

A DEFAULT value  clause in a data type specification explicitly indicates a default value for a column. Examples: 

CREATE TABLE t1 ( i INT DEFAULT -1, c VARCHAR(10) DEFAULT ’’, price DOUBLE(16,2) DEFAULT 0.00 ); 

SERIAL DEFAULT VALUE  is a special case. In the definition of an integer column, it is an alias for NOT NULL AUTO_INCREMENT UNIQUE . 

Some aspects of explicit DEFAULT  clause handling are version dependent, as described following. 

## Explicit Default Handling as of MySQL 8.0.13 

•Explicit Default Handling as of MySQL 8.0.13 

•Explicit Default Handling Prior to MySQL 8.0.13 

•Implicit Default Handling 

The default value specified in a DEFAULT  clause can be a literal constant or an expression. With one exception, enclose expression default values within parentheses to distinguish them from literal constant default values. Examples: 

CREATE TABLE t1 ( -- literal defaults i INT DEFAULT 0, c VARCHAR(10) DEFAULT ’’, -- expression defaults f FLOAT DEFAULT (RAND() * RAND()), b BINARY(16) DEFAULT (UUID_TO_BIN(UUID())), d DATE DEFAULT (CURRENT_DATE + INTERVAL 1 YEAR), p POINT DEFAULT (Point(0,0)), j JSON DEFAULT (JSON_ARRAY()) ); 

The exception is that, for TIMESTAMP  and DATETIME  columns, you can specify the CURRENT_TIMESTAMP function as the default, without enclosing parentheses. See Section 11.2.5, “Automatic Initialization and Updating for TIMESTAMP and DATETIME” . 

The BLOB , TEXT , GEOMETRY , and JSON  data types can be assigned a default value only if the value is written as an expression, even if the expression value is a literal: 

•This is permitted (literal default specified as expression): 

CREATE TABLE t2 (b BLOB DEFAULT (’abc’)); 

