Each object is referenced by a name. To rename an object, use the RENAME SQL statement or rename the selected object from the Control Panel (item Rename is active only for those objects you have sufficient privileges to modify). If you rename an object, you must change its name in all occurrences.
602SQL Server (since version 9.0) will perform the following actions when renaming an object:
No further actions will be performed by the 602SQL Server. It is up to the application author to replace the old name with the new one for all other occurrences of the object. It is necessary to:
- Change the name of the object in the relevant system tables.
- If the object name is a part of its definition, it will be changed in the definition as well.
- If you are renaming a table with referential integrity to another table, the relevant referential integrity rule is modified as well.
- If you are renaming a table with a defined trigger, the trigger definition will be modified as well (BEWARE: usually only a few users have the privileges to modify triggers);
- If you are renaming a domain, all table definitions that use this domain, will be modified as well.
- Adjusts the internal structure of the database describing object relations.
- Adjust the commands in stored procedures and triggers, if they work with the name of the object that was renamed.
- Adjust the queries stored on the server, if they use the renamed object.
- Adjust the expressions used in default column value definitions, integrity constraints, queries, etc., if they use a renamed function or make use of a renamed sequence value.
The maximum length of an object name is 31 characters. Names of users, groups and applications must be unique on a server. Names of other objects must be unique inside an application (scheme). If the object of the selected name already exists, the error sqlstate 40004 (KEY_DUPLICITY) will occur.
You can only rename objects you have sufficient privileges to modify. You cannot rename Fulltext objects.