Order by Clause in Ax 2012

You can order by clause to get record in ascending or descending following way.

 CustTable custTable;  
 //For ascending order  
 select custTable order by Name asc;  
 //For descending order  
 select custTable order by Name asc;