当我运行附加示例时,它会创建具有列 ID 和数据类型 bigint(295) 的表,我想将其定义为 int(11)。在更复杂的查询中(我有来自组 concat 的 id)我有文本而不是 int。
如何将创建表上的数据类型指定为mysql中的选择?
DROP TABLE IF EXISTS some_table;
CREATE TABLE IF NOT EXISTS some_table AS (
SELECT
CONVERT("123,456,789,987,654,321,741,852,963,147,258,369,123,456,789,987,654,321,741,852,963,147,258,369
,2123,456,789,987,654,321,741,852,963,147,258,369,123,456,789,987,654,321,741,852,963,147,258,369
,3123,456,789,987,654,321,741,852,963,147,258,369,123,456,789,987,654,321,741,852,963,147,258,369"
, SIGNED INTEGER) AS id);