java.sql.SQLException:子查询为Guest house返回多于1行

时间:2018-12-10 11:08:30

标签: mysql

实际上,我的查询应从以下查询中显示招待所名称,客房,已预订的客房,可用客房:

选择(a.hotel_name)作为hotel_name,(htl_room_information.id_hotel)作为total_room,(SELECT(htl_room_information.id_hotel)作为房间  FROM htl_booking_detail,htl_branch_info_lang b,htl_room_information,其中b.id = htl_booking_detail.id_hotel和htl_booking_detail.id_room = htl_room_information.id和{{from_date}}  和b.hotel_name = a.hotel_name)已预订的房间,(htl_room_information.id_hotel)-(选择htl_room_information.id_hotel作为房间  FROM htl_booking_detail,htl_branch_info_lang b,htl_room_information,其中b.id = htl_booking_detail.id_hotel和htl_booking_detail.id_room = htl_room_information.id和{{from_date}}  和b.hotel_name = a.hotel_name)(可从htl_room_information,htl_branch_info_lang a访问),其中htl_room_information.id_hotel = a.id

但是它显示如下错误:

java.sql.SQLException:子查询返回多于1行

请帮助解决此问题。

0 个答案:

没有答案