String sql = "select * from (select t.SENDSTATE ,t.SHIPID , x.NAME, r.POSTTIME, r.id, u.BEIDOUID,s.MSGCONTENT"
+ " from sendMsg_ToShip t "
+ " left join SendMessageInfo r on t.msgId = r.id"
+ " left join sendMsg_NoticeInfo s on r.msgInfoId = s.Id"
+ " left join ship_StaticInfo x on t.shipId = x.Id"
+ " left join TerminalInfo u on r.CostTerminalId = u.Id"
+ " from sendMsg_ToShip t "
+ " left join SendMessageInfo r on t.msgId = r.id"
+ " left join sendMsg_NoticeInfo s on r.msgInfoId = s.Id"
+ " left join ship_StaticInfo x on t.shipId = x.Id"
+ " left join TerminalInfo u on r.CostTerminalId = u.Id"
+ " where r.sendUserId = " + m_UserID + " order by r.posttime desc) where rownum <= 100 ";
//按时间倒序
select rownum as rowno,s.* from ( select t.* from RouteInfo t where t.adduserid = 1 order by addTime desc) s