cancel
Showing results for 
Search instead for 
Did you mean: 

How to add comments to table definition of column using HDBDD?

Former Member
0 Kudos

I could able to create tables using HDBDD syntax. But I want to add some comment to each column for the table. So that while opening table definition from catalog, the same comment should be present.

For example

Table Name Employee

Column Name     type                                        Comment

firstname              VARCHAR                              First Name of employee

lastname               VARCHAR                              Last name of employee

age                         INTEGER                              Age of employee in Months

If we define in HDBDD, it will be like

@Schema: 'MySchema'

@Catalog.table.Type: #COLUMN

entity Employee {

     firstname :  String(20);

     lastname     : String(20);

     age               : Integer;

};

In above hdbdd code, where can I put comment so that the comment should be visible  in table definition. I don't know, whether it is feasible thru hdbdd.

Accepted Solutions (0)

Answers (1)

Answers (1)

BenedictV
Active Contributor
0 Kudos

Hi Rajib,

Adding comments during table creation is not possible. You can add your comments to the fields after the table is created with using,

COMMENT ON COLUMN "schema"."table".field1 IS 'comments for field1';

Benedict

Former Member
0 Kudos

Hi Benedict,

Thanks a lot for responding.

Basically I don't want to maintain another set of SQL for statement. If this is the only way, then I feel, it will be better to create table using SQL. So that from maintenance  prospective, it will be good. I understand there are some pros and cons with either way.

Expecting SAP will consider this for future SPS implementation.

Rajib.

lbreddemann
Active Contributor
0 Kudos

Mate if you have ideas for features and want them to be considered, this is your blog!

Go wild!

former_member183326
Active Contributor
0 Kudos

See SAP Note 2265872 - Feature requests for the SAP HANA Platform