what is right command for change column name in sql database table.
is this write-
ALTER TABLE "table_name" Change "column 1" "column 2" ["Data Type"];
OR
ALTER TABLE Customer CHANGE Address Addr char(50);
why this commands give error, continous.
Refer the below query.
sp_RENAME 'TableName.[OldColumnName]' , '[NewColumnName]', 'COLUMN'
Ex
sp_RENAME 'Customers.[CustomerId]' , 'CustId', 'COLUMN'
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.