title: SQL MAX() Function
body: <p>I found a very interesting/strange thing about MAX() function in SQL.
  <br/>
  I have column ID with varchar2(20) data type, having following entries:-<br/>
  ID
  <code>
  <br/> 1
  <br/> 2
  <br/> 3
  <br/> 4
  <br/> 5
  <br/> 6
  <br/> 9
  <br/> 99
  <br/> 909<br/></code>
  As per my understanding if i use "select max(ID) from table;" I should get 909 as the result but i get 99. Can somebody explain why this is happening? </p>