I need to be able to "flag" a column on a table for special treatment and I am looking for a way to do this.
What I want to do is allow an administrator to somehow mark (flag) a column on a table. Then as part of another process, a script would scan all the columns in a database, looking for this flag, and take action based upon the data in this column.
This flag has to be applicable to existing, third-party databases, databases over which I have no control as to column names, or data types.
Ideally, I'd like to have some user-defined property of a column which would allow me to mark columns for use by my program. Does something like this exist.
The best solution I have come up with, so far, is to create a rule, which passes everything (LIKE '%'). By looking for the presence, or absence, of this rule, on a column, I have been able to flag columns.
I'd like to know, however, if there is a cleaner solution.