创建一个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

相关推荐

半解316:内容充实,细节需要修改一下。 1,整体压缩为一页。所有内容顶格。 2,项目描述删除,直接写个人工作量 修改完之后还需要建议,可以私聊
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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