REFERENCES users (userid) ON DELETE CASCADE
); 如果我运行这个命令,我会得到: ERROR: number of referencing and referenced columnsREFERENCES users (userid, userid) ON DELETE CASCADE 我得到了: ERROR: foreign key referenced-columnslistmust not contain duplicate 我知道如果我在每一行输入他们各自的引用就可以了,但最好不要<
你好,我有一个这样的数据库
正如您所看到的,它是一个酒店数据库,其中保存着有关预订、客户和房间的所有信息。问题出在bookings和BookDates表上。每个进行预订的客户都可以预订几个日期,这些日期不需要按任何顺序排列。这就是为什么我必须创建BookDates来避免这种情况的原因
But now I have the problem of how to relate those two tables as I can't just relate the part of compound key to the other table. That is how th