 <p>In the order by clause we can add two thing:</p> <ul> <li><p>Column names</p> <pre><code>Select * from TTT order by age; </code></pre></li> <li><p>Coulmn number to filter</p> <pre><code>Select * from TTT order by 2;//if age is the second column in the table or Select name,age from TTT order by 2; // this will order by age </code></pre></li> </ul> <p>In the following case the inner query</p> <pre><code> SELECT AGE FROM TTT WHERE NAME='TANDEL' </code></pre> <p>will return 5</p> <p>and the parent query</p> <pre><code> SELECT * FROM TT ORDER BY 5 </code></pre>