如题
1 回答
郎朗坤
TA贡献1921条经验 获得超9个赞
mysql> create table test -> (id int, -> col int generated always as (id+1) stored comment "generated column" -> );Query OK, 0 rows affected (0.04 sec) mysql> show create table test\G*************************** 1. row *************************** Table: testCreate Table: CREATE TABLE `test` ( `id` int(11) DEFAULT NULL, `col` int(11) GENERATED ALWAYS AS ((`id` + 1)) STORED COMMENT 'generated column' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 1 row in set (0.00 sec)
添加回答
举报
0/150
提交
取消