我正在从事一个小型电影项目,并希望在高级SQL查询中寻求帮助-我是一个完整的noob atm。

最佳答案

你是这个意思吗?

select SeatNo, 1 as available from Chair where SeatNo in (select SeatNo from Booki1)

Union

select SeatNo, 0  as available from Chair where SeatNo not in (select SeatNo from Booki1)

10-05 19:24