开发者

How can i assign value when creating a column of a mysql table?

开发者 https://www.devze.com 2023-04-01 13:33 出处:网络
alter table tablename add column mark tinyint NOT NULL; I want to assign 1 as a default value of 开发者_高级运维that mark column .
alter table tablename add column mark tinyint NOT NULL;

I want to assign 1 as a default value of 开发者_高级运维that mark column .

How can i do this ?


alter table tablename add column mark tinyint default 1 NOT NULL;
0

精彩评论

暂无评论...
验证码 换一张
取 消