//普通查询
select top 10 HotelId, HotelName, Tel, LinkMan, EBooking from hotel where hotelid in (select hotelid from hotelorder where orderstatus=22 and orderid in (select orderid from hotelorderdetail where roomavailid =1 and status=0))
//分页查询
select top 10 HotelId, HotelName, Tel, LinkMan, EBooking from hotel where hotelid not in (select top 0 hotelid from hotel)
//求如何合成普通查询和分页查询,即普通查询且可以分页