【发布时间】:2018-09-13 04:23:22
【问题描述】:
我有一张名为 room 的桌子
id 房间
1 1 号房间
2 2 号房间
还有一个名为 order 的表
id id_room date_arrival date_departure
1 1 2018-09-13 2018-09-15
2 1 2018-09-27 2018-09-29
当我选择 2018-09-14 的 date_arrival 和 2018-09-20 的 date_departure 时,我希望出现一个未预订的房间。
【问题讨论】:
-
Order 是保留字,作为表/列标识符的选择很糟糕
-
如需进一步帮助,请参阅meta.stackoverflow.com/questions/333952/…
标签: mysql sql between cross-join