题解 | 创建表格

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

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

  • 创建表格 create table xxx()
  • primary key 单独写
  • 外键写法:
  • FOREIGN KEY (Id_P) REFERENCES Persons(Id_P)
    
CREATE table actor (
actor_id smallint(5),
first_name varchar(45) not null,
last_name varchar(45) not null,
last_update date not null,
PRIMARY KEY (actor_id));
一个确认不会重复建表的操作
drop table if exists actor;

全部评论

相关推荐

10-13 12:53
已编辑
湖北工业大学 前端工程师
小海c:包装一下,第一个感觉是字节青训营的那个,后面那个是黑马的
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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