title: Adding unique key/index to table and its influence on existing records
body: <p>I have a table that was doing fine with no unique keys so far. This table is working fine but the code of inserting/updating/deleting procedures is getting a bit unreadable since conditions to recognize a correct entry in table are getting longer and longer, so I started to consider adding a new column with an unique ID to it.</p>
  
  <p>There are already answered questions about adding a unique identity to table on SO, but I was wondering if it can have any negative impact on currectly existing records. The table itself isn't big, it never has more than a few thousands of entries, but it's used and updated often and it wouldn't be easy to stop using it for more than a moment. So is there anything I should be aware of that could mess up the data or can I just happily add a column with unique identity and everything will work just fine? Can there be any problems with currently existing stored procedures, especially the ones altering the records? To be honest I can't think of anything but I'd rather be sure since I'm far from being experienced in SQL and databases.</p>
  
  <p>Same for adding indexes to an already existing table - I imagine there would be some shifting around involved, so is there any negative impact on the records?</p>
  
  <p>If you need examples of the procedures I mentioned, just think of simple insert/delete/update statements with needlessly long where clauses. No joins with other tables, no multiple transactions within a single procedure.</p>