How to query and update column DESCRIPTION field by JDBC
Hi ,
When I use jdbc driver to query the column info ,the "REMARKS" field always show the same as the "COLUMN_NAME" field.
When I use the sql "select * from INFORMATION_SCHEMA.columns a where a.table_name='some table name ' " to query columns info,there has a "DESCRIPTION" field ,the value is some comment for the current field.
So is there anyway to return the description to the jdbc remarks field? And is there anyway to update the desciption or remarks field? Or is there some other way that I don't know to manage column comment info?
Product version: Caché 2018.1
Hi! Unfortunately there is no way to UPDATE the %DESCRIPTION information on a table or column with SQL.
But you can add these information while CREATEing a table like this:
or this way for a column:
Please see CREATE TABLE | InterSystems SQL Reference | InterSystems IRIS Data Platform 2022.1 for more details.
By default the %DESCRIPTION information is projected to the Remarks column via JDBC:
As you can see the text comes from the %DESCRIPTION property:
This works also for the columns.
This is from JDBC:
This is from INFORMATION_SCHEMA.COLUMNS:
Andreas