We have a database with the original table and column names created in all UPPER CASE (influenced from back in the day when one of those other databases had to have upper case names...). I would like to clean it up by changing all these to lower case (much more readable, and consistent with all the newer tables).
But an ALTER...RENAME tells me the table or column already exists.
It feels pretty scary to rename to a slighlty different name and then back to the original in lowercase... what underlying and undetectable effects will this have...
Is there a safe way?
asked 14 Dec '15, 14:51
So, sounds like I haven't missed anything obvious. I guess my plan wll be: 1. Do an UNLOAD 2. Write a Stored Proc to use the catalog tables to pickup the uppercase names and then REPLACE the values in the script file. 3. Do the RELOAD.
And... get a nice tidy defragged database file in the process.
The DB is only 8GB in size, and we have a substantial server, so not really a big deal.
Thanks Volker and Mark.
answered 14 Dec '15, 16:28