我有 3 张桌子:
tblNames
:
| id | firstname | lastname |
+------+---------------+--------------+
| 1 | John | Smith |
tblJosbs
(此表同时接受多个复选框值):
| id | jobs |
+------+-----------------------+
| 1 | Nurse |
+------+-----------------------+
| 2 | Call Center Agent |
+------+-----------------------+
| 3 | Police |
tblNamesJobs
(此表用于JOIN
其他 2 个表):
| id | name_id | jobs_id |
+------+-------------+-------------+
| 1 | 1 | 1 |
+------+-------------+-------------+
| 2 | 1 | 2 |
+------+-------------+-------------+
| 3 | 1 | 3 |
一切都很好,但是有人可以告诉我在INSERT
添加新信息时应该使用的第三张表的语句吗?