-
-
Notifications
You must be signed in to change notification settings - Fork 539
Closed
Labels
bugDefective behaviour in HeidiSQLDefective behaviour in HeidiSQLnettype-mssqlSQL Server specific issueSQL Server specific issue
Milestone
Description
Preconditions
- HeidiSQL version: 12.5.0.6691 and below
- Database type and version: MS SQL 12.0
- OS: Windows 10
Describe the bug
The ALTER TABLE statement produced by the Heidi when editing column of a table from UI has incorrect syntax on TSQL (MS SQL Server). The query produced by Heidi is:
ALTER TABLE "dbo"."SomeTable" ALTER COLUMN "SomeColumn" "SomeColumn" VARCHAR(20) NULL DEFAULT NULL COLLATE 'Cyrillic_General_CI_AS';
There two problems here:
- It seems that the column name in the query is duplicated;
- The collation should be without single/double quotes.
The correct syntax for the ALTER statement is:
ALTER TABLE dbo.SomeTable ALTER COLUMN SomeColumn VARCHAR(20) COLLATE Cyrillic_General_CI_AS NULL;
To Reproduce
- Edit particular column definition of a table from UI, for example try to change the type from VARCHAR(10) to VARCHAR(20);
- Click on the Save button
- See error message: SQL Error (102): Incorrect syntax near...
Screenshots or Crash reports
Metadata
Metadata
Assignees
Labels
bugDefective behaviour in HeidiSQLDefective behaviour in HeidiSQLnettype-mssqlSQL Server specific issueSQL Server specific issue
