在last_update后新增一列名字create_date

在last_update后面新增加一列名字为create_date

https://www.nowcoder.com/practice/119f04716d284cb7a19fba65dd876b03

alter table actor add column create_date datetime not null default '2020-10-01 00:00:00' after last_update


在一个已经建好的表中增加一列:

alter table TABLE_NAME add column NEW_COLUMN_NAME varchar(20) not null ;

指定插入位置:

alter table TABLE_NAME add column NEW_COLUMN_NAME varchar(20) not null after COLUMN_NAME ;

插入到第1列:

alter table TABLE_NAME add column NEW_COLUMN_NAME varchar(20) not null first ;

全部评论

相关推荐

06-07 19:59
门头沟学院 C++
补药卡我啊😭:都快15年前的了还在11新特性
你的简历改到第几版了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务