• I'll give you the @objtype change as something to be corrected, and the second as I just reread ap_rename. Now, how to deal with multiple schemas??

    Without testing, does the new table name keep the old table name's schema?

    Yes. Schemas are handled the way mine was written. No need to re-qualify anything. The @objname finds the object, and the @newname is the new name of the object within that schema.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato