>nMsgId nParentId > 1 1 > 8 1 >10 1 >11 10 >12 8 >13 12 select nMsgId,nParentId from myTable order by ????? >nMsgId nParentId > 1 1 > 8 1 >12 8 >13 12 >10 1 >11 10 *- This does not look ordered to me. Why do nMsgID's 10 and 11 come after 13?