My favorites | Sign in
Project Home Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 3179: Modify table comment does not work
2 people starred this issue and may be notified of changes. Back to list
Status:  NeedInfo
Owner:  ----
Closed:  Dec 2013


Sign in to add a comment
 
Reported by hit1205...@gmail.com, May 6, 2013
** What exact steps will reproduce the problem?

a)
1. Add [comment] to a column, columns, or table.
2. Click [save].

b)
1. Add columns by context menu or shortcut keys.
2. Click [save].
(Only happen when add multi-columns.)

b)
1. Remove columns by context menu or shortcut keys.
2. Click [save].
(Only happen when remove multi-columns.)


** What was the expected output?

a) Save comment/comments.
b) Save columns.
c) Remove columns.


** What happened instead?

Popup an alert window: "SQL Error (102): Incorrect syntax near ____."
The underline is:
a) COMMENT
b) ADD
c) DROP


** Suggested fix (optional)?

a)

Now:

ALTER TABLE "__(table name here)__"
COMMENT='';

ALTER TABLE "__(table name here)__"
ALTER COLUMN __(syntax here)__ COMMENT '__(comment here)__';

Fix:

I don't know, it seems have to use sp_addextendedproperty / sp_updateextendedproperty / sp_dropextendedproperty to add, update, or drop comment?

b)

Now:
ALTER TABLE "__(table name here)__"
ADD __(syntax here)__ ,
ADD __(syntax here)__ ,
ADD __(syntax here)__

Fix:
ALTER TABLE "__(table name here)__"
ADD __(syntax here)__ ,
__(syntax here)__ ,
__(syntax here)__

c)

Now:
ALTER TABLE "__(table name here)__"
DROP __(syntax here)__ ,
DROP __(syntax here)__ ,
DROP __(syntax here)__

Fix:
ALTER TABLE "__(table name here)__"
DROP __(syntax here)__ ,
__(syntax here)__ ,
__(syntax here)__


** Version used?

HeidiSQL revision:
The latest build r4390 (v7.0.0.4390)

MySQL Server version:
MS SQL Server Express

Operating system:
Windows 7 (x64)


May 6, 2013
#1 hit1205...@gmail.com
Oops, the SQL Server version is 2008 Express, I forgot to type it.
May 24, 2013
Project Member #2 a...@anse.de
(No comment was entered for this change.)
Status: Accepted
Labels: Severity-Broken MSSQL
Jun 9, 2013
Project Member #3 a...@anse.de
a) Modifying comment: it's not clear to me what to do here. I hope you can help out here with SQL syntax.

b) Adding multiple columns: MSSQL requires only one ADD keyword when adding multiple columns. Additional ALTER COLUMNS need a separate query

c) Dropping multiple columns: Same as b)
Jun 28, 2013
#5 hit1205...@gmail.com
a)
According to the documents I searched on MSDN website, it seems MS SQL could only change comment in these way: 
add http://msdn.microsoft.com/zh-tw/library/ms180047.aspx
update  http://msdn.microsoft.com/zh-tw/library/ms186885.aspx
drop http://msdn.microsoft.com/en-us/library/ms178595.aspx

I don't know that there is any simpler way to do these.

Nov 15, 2013
Project Member #6 a...@anse.de
(No comment was entered for this change.)
Summary: Modify table comment does not work (was: Incorrect MS SQL syntax when COMMENT , ADD, or DROP column)
Dec 5, 2013
Project Member #7 a...@anse.de
The documentation links do not even mention comments...?
Status: NeedInfo
Sign in to add a comment

Powered by Google Project Hosting