|
CREATE OR REPLACE TABLE t1 (a BIGINT);
|
CREATE OR REPLACE TABLE t2 AS SELECT
|
a, ROUND(a), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1;
|
DESC t2;
|
+---------------+---------------+------+-----+---------+-------+
|
| Field | Type | Null | Key | Default | Extra |
|
+---------------+---------------+------+-----+---------+-------+
|
| a | bigint(20) | YES | | NULL | |
|
| ROUND(a) | bigint(19) | YES | | NULL | |
|
| TRUNCATE(a,0) | bigint(19) | YES | | NULL | |
|
| FLOOR(a) | decimal(19,0) | YES | | NULL | |
|
| CEILING(a) | decimal(19,0) | YES | | NULL | |
|
+---------------+---------------+------+-----+---------+-------+
|
The data types for all columns with functions are not equal to the original data type. Looks wrong. All data types are expected to be bigint(20).
|