sp_rename [@objname =] 'object_name', [@newname =] 'new_name' [, [@objtype =] 'object_type']Arguments[@objname =] 'object_name' Is the current name of the user object (table, view, column, stored procedure, trigger, default, database, object, or rule) or data type. If the object to be renamed is a column in a table, object_name must be in the form table.column. If the object to be renamed is an index, object_name must be in the form table.index. object_name is nvarchar(776), with no default. [@newname =] 'new_name' Is the new name for the specified object. new_name must be a one-part name and must follow the rules for identifiers. newname is sysname, with no default. [@objtype =] 'object_type' Is the type of object being renamed. object_type is varchar(13), with a default of NULL, and can be one of these values.
[@newname =] 'new_name'
[, [@objtype =] 'object_type']Arguments[@objname =] 'object_name'
Is the current name of the user object (table, view, column, stored procedure, trigger, default, database, object, or rule) or data type. If the object to be renamed is a column in a table, object_name must be in the form table.column. If the object to be renamed is an index, object_name must be in the form table.index. object_name is nvarchar(776), with no default. [@newname =] 'new_name'
Is the new name for the specified object. new_name must be a one-part name and must follow the rules for identifiers. newname is sysname, with no default. [@objtype =] 'object_type'
Is the type of object being renamed. object_type is varchar(13), with a default of NULL, and can be one of these values.