Re: Changing a table name
Posted in 1996
YES there is a better way. RENAME TABLE <table name> TO <new table name> I would strongly suggest not modifying data in the system catalog tables. -Bill } } Can anyone suggest a reason why we should not change } a table name by updating 'systables'? Provided that } we take reasonable precautions (eg backup, exclude } all other users etc.) } } As user informix, use isql to go into systables and } note the tabid (nnnn) of the table(s) that need to } be changed. Then :- } } update systables } set tabname = "newname" } where tabid = nnnn ; } } I've tried this, it seems to work and the test } system's still flying, but the _real_ data base } has some 2 million records so I'm naturally } aprehensive in case there are some long term effects. } Needless to say the associated user software will } be changed at the same time to reflect this update. } } Or is there a better way of doing it? } } Peter Jennings. -- Bill Ennis Voice: 312-474-7516 SSA Fax: 312-474-7460 500 W. Madison email: ennis@ssax.com