我尝试在 SQL 中使用 Create Table 创建一个表, 一个人可以在多个地方工作,一个地方可以有多个人工作, 这就是我正在尝试的,我确定它不正确
create table ( person char(15), place char(15), salary int)
既然一个人可以在多个地方工作,我很困惑元组位置是否应该有多个值, 如果是。我该怎么做 提前致谢
最佳答案
它被称为n 到m 的关系。使用3个表
persons table
-------------
id int
name varchar
places table
------------
id int
name varchar
place_persons table
-------------------
place_id int
person_id int
关于mysql - 在 SQL 中创建一个表,其中每个元组可以有多个值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26430013/