首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

求SQL语句改写解决方法

2012-03-08 
求SQL语句改写//普通查询selecttop10HotelId,HotelName,Tel,LinkMan,EBookingfromhotelwherehotelidin(sel

求SQL语句改写
//普通查询
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)


//求如何合成普通查询和分页查询,即普通查询且可以分页

[解决办法]
看看老大的blog
http://blog.csdn.net/zjcxc/category/125592.aspx
[解决办法]
把你的普通查询当成一个表呗?

热点排行