What's the best way to find out the constraints on a IBMi DB2400 table from a java program?
I need a way for my java layer to inspect what constraints exist for all files/tables within a particular library (on an 开发者_如何学GoIBMi/iSeries/System-i/AS400 system). I know that I can query the SYSIBM.TABLE_CONSTRAINTS view to find out, but is this a legitimate and safe way to go about it? Is there a better way?
It would be preferable if it could be done with Sql using the com.ibm.db2.jdbc.app.DB2Driver jdbc driver. But I am open to other suggestions.
Note: answers not pertaining to DB2400 on the IBMi platform are not useful here.
It is legit and safe to query that table. There are some possible system API calls or commands you could use with a SQL UDF but it's not worth doing over a query on that table.
精彩评论