title: how to create an order column in sql server
body: <p>i want an order info for every row in my table. the following is my table. ID column is identity and its primary key. Order column is computed from id column.</p>
  
  <pre><code>   ID     --      Name     --     Order
      1             kiwi              1
      2             banana            2
      3             apple             3
  </code></pre>
  
  <p>everything is fine and i have an order column. But i cant switch the orders of rows.
  for example i cant say that from now on kiwi's order becomes 2 and banana's order becomes 1 
  in other words if we would update a computed column then my problem could be solved.</p>
  
  <p>if i dont create order column as computed column then for every new entry i have to compute largest order so that i can write (largest order) + 1  for new entry's order. But i do not calculate largest number for every entry since it is costly.</p>
  
  <p>So what should i do now?</p>
  
  <p>I ve searched and the solutions i found creating trigger function etc. i do not want to do that too. </p>