Is there a DB2 v9.1 equivalent for sp_rename?
A:
It depends on the object.
For tables and indexes, you can use the RENAME sql statement.
If you want to rename a column, you can use ALTER TABLE ... RENAME COLUMN.
For other objects, you probably have to drop and recreate it.
Hope that helps.
Michael Sharek
2009-05-08 18:41:42
can i rename an sp or do i have to do a drop - create??
Rashmi Pandit
2009-05-11 06:06:10
You have to do drop/create...alter procedure doesn't allow rename.http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.admin.doc/doc/r0008168.htm
Michael Sharek
2009-05-11 15:26:18
Thanks Michael. I guess sp_rename in SQLServer would internally do the same. Drop and recreate.
Rashmi Pandit
2009-05-16 06:50:46