Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Generating COMMENT ON statement

64421Feb 3 2004 — edited Feb 5 2004
I am dealing with an application that has a set of meta data tables. One table includes table_name, column_name and comments values in the form:
TABLE_NAME VARCHAR2 255
COLUMN_NAME VARCHAR2 255
COMMENTS VARCHAR2 255

Is there a way via a trigger to generate and execute the COMMENT ON syntax to populate the table in Oracle's data dictionary with this information?

I have tried coding the statement directly in the trigger body, but it doesn't appear to like a DML statement of this type.

I have also tried passing the table, column, and comment values as parameters to a procedure and generate the statement using the EXECUTE IMMEDIATE command, but again, it doesn't appear that this type of DML statement is acceptable in that context.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 4 2004
Added on Feb 3 2004
3 comments
219 views