Support REMARKS for columns and tables
See original GitHub issueDriver version or jar name
Microsoft JDBC Driver 6.4 for SQL Server 6.4.0.0
SQL Server version
Microsoft SQL Server 14.00.3015
Client operating system
Windows 10
Java/JVM version
Java™ SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot™ 64-Bit Server VM (build 25.121-b13, mixed mode)
Table schema
CREATE TABLE Publishers
(
Id INTEGER NOT NULL IDENTITY,
Publisher VARCHAR(255),
PRIMARY KEY (Id)
);
EXECUTE SP_ADDEXTENDEDPROPERTY 'MS_Description',
'List of book publishers',
'user', 'dbo', 'table', 'Publishers'
;
EXECUTE SP_ADDEXTENDEDPROPERTY 'MS_Description',
'Unique (internal) id for book publisher',
'user', 'dbo', 'table', 'Publishers', 'column', 'Id'
;
EXECUTE SP_ADDEXTENDEDPROPERTY 'MS_Description',
'Name of book publisher',
'user', 'dbo', 'table', 'Publishers', 'column', 'Publisher'
;
Problem description
DatabaseMetaData.getTables(...)
and DatabaseMetaData.getColumns(...)
does not return table and column descriptions in the REMARKS
column. The REMARKS
column should have the description from the extended properties.
Expected behavior and actual behavior
See above.
Repro code
Call DatabaseMetaData.getTables(...)
and DatabaseMetaData.getColumns(...)
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Does Derby support table and column comments?
By 'table and column comments' you mean the ability to associate a comment (e.g. a description of the table / column) with the...
Read more >Should I comment Tables or Columns in my database?
Microsoft SQL Server supports comments on both tables and columns, and it's pretty easy to set them through the IDE (Microsoft SQL ...
Read more >How to View Comments for Tables and Columns in Oracle ...
To view comments for tables, select 'Tables' at the root of the treeview. · Click on a table in the Main View to...
Read more >How to generate syntax for Comments of Tables and Columns ...
Solution: Yes, SQL Server does support Table and Column Comments and Forward Engeering from erwin DM also generates the needed syntax. However, ...
Read more >H2 Remark support for columns and tables. - Liquibase Forum
Hello, I stumbled across a lack of support for remarks (comments) when dealing with H2 databases. H2 supports the SQL standard COMMENT ON…...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @cheenamalhotra The current status of this point is not clear for me. I do not understand your comment from the 8th of May in combination with the changed statuses. Do you want to explain why this issue is closed? Thank you.
HI @sualeh
“Extended properties” are meant to store Key-Value pairs for anything that can be useful for maintaining details about table/column. Adding additional property to the driver for reading these extended properties and finding out description does not sound a robust solution, as:
In our point of view, these properties should be treated as “Extended properties” only, not to be mixed with
Remarks
and must be fetched as Key-value Pair array by callingfn_listextendedproperty
in client applications.Remarks
on the other hand, is always returned NULL from SQL Server, and all SQL Server drivers follow same rule, including jTDS Driver, hence JDBC Driver should abide to that as well.