Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

MSSQL: rename column doesn't work

igitur's profile image igitur posted 4 years ago in General Permalink
Currently, HeidiSQL attempts to rename a column on a table as such:
ALTER TABLE "dbo"."TableName"	ALTER COLUMN  "NewColumnName" BIT NOT NULL;


The correct syntax to rename a column in MSSQL is:
EXEC sp_RENAME 'TableName.OldColumnName' , 'NewColumnName', 'COLUMN'
.

Please login to leave a reply, or register at first.