title: Swapping two rows in a table with unique, not null constraint
body: <p>I have a table with column position, which has unique and not null constraint.</p>
  
  <p>I have move up/down the selected table item requirement,</p>
  
  <p>for that I am taking the selected index and swapping the indexes.</p>
  
  <p>And saving those two items  as in DB.</p>
  
  <p>whenever I am trying to insert first item itself its giving UNIQUE constraint..</p>
  
  <p>Because the item's index is already there in DB.</p>
  
  <p>There is a possibility that I can take temporary index, swapping... and saving .. I think it works.</p>
  
  <p>But is there any other way to achieve this requirement</p>