2
當我運行附加的例子,它創建表的列ID和數據類型bigint(295) 我想定義它爲int(11)。 在更復雜的查詢中(我從組concat中獲得了ID)我得到了文本而不是int。如何在創建表上指定數據類型爲select in mysql?
如何在創建表上指定數據類型爲select in 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);