Home > Net >  SQL table dormitory of building dormitory number conflict
SQL table dormitory of building dormitory number conflict

Time:03-29

Like, ask, what am I doing the dormitory management system, the dormitory table has dormitory, which is the primary key, in the building number, now the problem is the dormitory is a primary key, so also is the dormitory, not repeat, but different between dormitory building number may be have the same number of dormitory, dormitory building with 312 dormitory, such as 11 12 dormitory building there are 12 dormitory, the problem is how to solve

CodePudding user response:

Joint primary keys

CodePudding user response:

Number + dormitory building is the primary key

CodePudding user response:

Joint primary keys
Or insert - dormitory building such as the primary key
  •  Tags:  
  • C#
  • Related