John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
Microsoft SQL Server
Versions des environnements
SQL Server:
SQL Server 2012
>>Alter Table 'mytable' AlterColumn.'mycolumn' INT NOT NULL (or whatever). If the column is used in a constraint, you may have to drop the constraint first, then recreate it...
>
>This syntax changes the colum name?
no, I misread what you typed... sorry...
EXEC sys.sp_rename
@objname = N'dbo.Company.CompanyName',
@newname = 'Name',
@objtype = 'COLUMN'
From the documentation (sp_rename (Transact-SQL))
If the object to be renamed is a column in a table, object_name must be in the form table.column or schema.table.column. If the object to be renamed is an index, object_name must be in the form table.index or schema.table
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement