• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[SQL] how to create fk int in TABLE

pablobion

Member
Joined
Aug 31, 2016
Messages
39
Solutions
1
Reaction score
5
  1. Filme
  2. COD (int, pk)
  3. nome(varchar 20, not null)
  4. nascimento(datetime, not null)
  5. obs(tinybit, not null)
  6. obs2(int, fk, not null)

I thought of something of the type

create table filme (
COD int PRIMARY KEY AUTO_INCREMENT,
nome varchar(200) NOT NULL,
nascimento datetime NOT NULL,
obs tinyint NOT NULL,
obs2 int NOT NULL
)



I do not know how to create fk ... how do i create an int fk?
 
Back
Top