Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的数据库中有 2 个表:公司和员工。每个公司可以有多个员工,每个员工可以在多个公司工作。因此我需要一个名为company_employees 的多对多关系表。
我想我理解 CRUD 的“检索”和“删除”部分,但你如何“创建”和“更新”?假设用户将员工添加到公司。代码是什么?