创建一个actor表,包含如下列信息

创建一个actor表,包含如下列信息

http://www.nowcoder.com/questionTerminal/ac233de508ef4849b0eeb4f38dcf09cf

create table if not exists actor
(
actor_id smallint(5) not null primary key,
first_name varchar(45) not null,
last_name varchar(45) not null,
last_update timestamp not null default(datetime('now','localtime'))
)
/*default(默认放在括号里)

全部评论
楼主你好,请问id列加了primary key 为什么还需要加not null 才能通过。。。还有default null 的话我记得是不需要加括号,其它的需要加括号?
点赞 回复
分享
发布于 2020-07-21 10:45

相关推荐

1 收藏 评论
分享
牛客网
牛客企业服务