Re:Changing a table name
Posted in 1996
Topics: General Discussion
Peter Jennings <peter_jennings@uk.ibm.com> wrote: > > 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. > Why not "RENAME TABLE old_name TO new_name" ? Regards, Ed --- ================================================== Ed M. Rappa, programmer eddy@mec.lviv.ua MEC Ukraine Lviv, Ukraine