DECLARE @indexTabel TABLE(Nid int IDENTITY(1,1) PRIMARY KEY,Id nvarchar(50))
INSERT INTO @indexTabel
SELECT ho.SerialId FROM [TCHotelOrder].dbo.HotelOrder ho
WITH(NOLOCK) INNER JOIN [TCHotelOrder].dbo.HotelOrderNewExtend hone
WITH(NOLOCK) ON hone.SerialId = ho.SerialId AND hone.CurrentTrackID > 0
LEFT JOIN [TCHotelOrder].dbo.HotelOrderExtendCtrip hoec
WITH(NOLOCK) ON hone.SerialId = hoec.OrderSerialId
LEFT JOIN [TCHotelOrder].dbo.HotelOrderExtendTripHotel hoectrip
WITH(NOLOCK) ON hone.SerialId = hoectrip.OrderSerialId WHERE 1=1 AND ho.CreateDate>='2015-09-15' AND hoectrip.Id > 0
GROUP BY ho.SerialId,ho.CreateDate
ORDER BY ho.CreateDate
DESC DECLARE @RowCountVar INT;
SET @RowCountVar=@@ROWCOUNT;
SELECT @RowCountVar;
SET @RowCountVar = (case when (@RowCountVar
SELECT ho.SerialId,hi.Name,ho.MComeMobile,ho.MComeName,ho.MMobile,ho.Flag,ho.ConfirmType,ho.BookType,ho.IsHotelConfirm,ho.HotelType ,ho.Rooms,ho.Amount,ho.ComeDate,ho.LeaveDate,ho.CreateDate,hot.CurrentOperatorName,hot.CurrentAnchor,hot.TrackId,hoec.CtripOrderId ,hone.HONEIsTimelyConfirmed,hone.IsEndOrder,isnull(hone.HONEIsCCTOrder,0) as iscct ,hone.HONEIsPromo ,hone.HONECurrency Currency ,hi.HICtripHotelMonthTrial CtripHotelMonthTrial ,hone.IsHandselTickets
FROM @indexTabel it inner join [TCHotelOrder].dbo.HotelOrder ho
with(nolock) on it.Id=ho.SerialId left join [TCHotelResource].dbo.HotelInfo hi
with(nolock) on ho.HotelId=hi.Id left join [TCHotelOrder].dbo.HotelOrderNewExtend hone
with(nolock) on ho.SerialId=hone.SerialId left join [TCHotelOrder].dbo.HotelOrderTrack hot
with(nolock) on (hone.CurrentTrackID=hot.TrackId and hone.CurrentTrackID0) LEFT JOIN [TCHotelOrder].dbo.HotelOrderExtendCtrip hoec
WITH(NOLOCK) ON hone.SerialId = hoec.OrderSerialId
/*Flat:TC_HotelOrderAdmin/Author:酒店客服系统/For:订单查询/File:///TC_HotelOrderAdmin.DataAccess.HotelDBConfig.cs/Fun:GetSqlComments/InquiryMan:System*/
WHERE it.Nid> (@RowCountVar-1)*10 AND it.Nid< (@RowCountVar*10+1) order by it.Nid
请问以上语句是什么意思啊?求每个语句的详细解释