Incorrect table definition; there can be only one auto column and it must be defined as a key

0

I was generating the tables for my dbDaca.sql database, it turns out that I have the following problem:

Knowing that my PRIMARY KEY FOR ALL MY TABLES is IdColaborador, that's why in each table I put a references. You will wonder why I put "NroEstudio", what happens is that a collaborator has 1 or more technical studies so this field is set to count how many studies have been done and list it from 1 to n times.

  • the logic that I am carrying out is that in my bd there are 11 tables, of the 11 tables all the fields belong to a person, and when making a query I would only call with the IdColaborador and I would botari the 11 tables, that is why in each one I only place the IdColaborador as a reference, what do you think? or should I create a PRIMARY KEY for each of my tables? and then to call all that information, would I use the inner join? Thank you very much in advance for your support, regards.
asked by Kevin Marshall 27.02.2018 в 15:36
source

0 answers