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.
我的 'useroptions' 表中有一个外键,它指向表 country 中的 countryId:
countryId VARCHAR(2) FOREIGN KEY(countryId) REFERENCES country(code)
我希望用户能够将此字段更新为某种“空”值,以防用户不想提交他的国家(这也应该是默认值)。
一个人将如何解决这个问题?我尝试使用“NULL”,但 HTML 表单显然无法提交值“NULL”(至少不是我所知道的?)