-4
- Film
- COD (int, pk)
- name(varchar 20, not null)
- birth (datetime, not null)
- Obs(tinybit, not null)
- Obs2(int, fk, not null)
I thought of something like
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 can’t create fk...
how do I create a fk int?
Thank you! helped me a lot.... but I have another problem I can not add anything in the line when you have a fk, for example if you have fk in Obs2 I can not add anything in the table, you know tell me pq? (I’m learning sql now)
– PLegendary
@Jolegendary, as the problem was solved in this answer, it is ideal for you to mark it as accepted and create a new question. Read at that link
– rLinhares