I'm attempting to write a Java application which creates test data in a table specified by the user. But my app needs to know which columns need to be unique, and which make up the index and/or primary index of the table. Since the Teradata JDBC driver does not support getIndexInfo, is there another way I can obtain this information?
Well the samples that came with the driver included a file showing how to get index information, leading me to believe that it worked. But when I tried using getIndexInfo(), INDEX_NAME in the ResultSet was always null. I know the ResultSet was set correctly because TABLE_NAME and some other data was present, but the actual name of the index column(s) were not there.
Maybe I'm having nomenclature issues...the Index that getIndexInfo() is talking about should be Teradata's Index, right...like the primary index? Or is it some other relational db feature with the same name?
INDEX_NAME would be NULL if the index wasn't given a name during the time of creation (which is purely optional in TD) ... (you can check the table DDL via the show table tablename) command to see if those indexes had a name or not.