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: Table comments

Clarkey's profile image Clarkey posted 6 years ago in General Permalink
FYI, just reporting a bug.

The table comments do not work with MSSQL, nor can I see the code for MSSQL views (just blank).

Great software, use it all day everyday - thank you.
kalvaro's profile image kalvaro posted 6 years ago Permalink
Before Anse asks about it... SQL Server uses procedures and internal table properties to store comments. E.g.:

CREATE TABLE USER (
USER_ID INT IDENTITY(1, 1) NOT NULL,
CONSTRAINT USER_PK PRIMARY KEY (USER_ID)
);
EXEC sys.sp_addextendedproperty
@name=N'MS_Description',
@value=N'Application users',
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'TABLE',@level1name=N'USER';
EXEC sys.sp_addextendedproperty
@name=N'MS_Description',
@value=N'Auto-incremented ID',
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'TABLE',@level1name=N'USER',
@level2type=N'COLUMN',@level2name=N'USER_ID';

Code modification/commit from ansgarbecker, 5 years ago, revision 4998
MSSQL: Fix broken query for altering column comment via table editor. See
* here: http://www.heidisql.com/forum.php?t=16947
* and here: http://www.heidisql.com/forum.php?t=18119
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.
igitur's profile image igitur posted 5 years ago Permalink
r4998 was supposed to fix this, but I still can't see comments for tables. I also reported it in http://www.heidisql.com/forum.php?t=19576
igitur's profile image igitur posted 5 years ago Permalink
Sorry, I was confusing table comments and column comments. But neither work for me anyway.
ansgar's profile image ansgar posted 5 years ago Permalink
r4998 was supposed to fix altering column comments. Could it be that the query HeidiSQL is using to retrieve table structure does not reveal the column comments?
igitur's profile image igitur posted 5 years ago Permalink
Hmmm, really confused now. The original poster of this issue, Clarkey, posted about TABLE comments not working. In the commit log of r4998 you mention COLUMN comments.

I don't know whether reading and displaying TABLE comments work, but add/altering them doesn't work. I'll reply on the other thread about column comments.

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




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.