I have two tables,
tblCode has about 4100 rows and is used in production.
tblCodeAlternative has about 4200 rows and is in the production database but not used anywhere.
What I need to do is swap the contents of the above database so
So really what I want to do is swap the contents of the two tables. I have tried to rename
tblCodeTemp, then rename
tblCode and lastly rename
However, for some reason this makes some of the application fail. The database itself is not producing any errors, in fact the renaming is surprisingly quick.
I'm not entirely sure why parts of the application is failing. If I revert the renaming then it all works again.
To rule out any mistakes on the database side, is it OK to rename a table the way I have done, or should it be done in another more robust way? I realise that for a few seconds there is no table called
tblCode which is used in the application.