Generating COMMENT ON statement
64421Feb 3 2004 — edited Feb 5 2004I 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.