• 创建表格 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;