Question related to JoinRowSet
Posted: Wed Aug 21, 2013 11:13 am
Hi,
Let's say that I join 2 tables each one of 4 columns, BOOK and AUTHOR.
matched with ID column for AUTHOR and IDAUTHOR for BOOK
I will have an output of 8 column in7 the database if I join the two;
However getMetaData().getColumnCount() in the program gives me back 7.
Apparently of the matcher columns only one of the two tables are actually reported to the Java layer;
Is there a rule to determine which of the matcher column is going to be taken and which not?
for example rule such as " If I add first a rowset representing AUTHOR and then a rowset representing BOOK, it's ID the column to be shown and not IDAUTHOR and if I did the other way round it would be viceversa?
EDIT: yes it is I have just tried. However why? and what if there were more than 2 tables to join?
Thanks in advance.
Let's say that I join 2 tables each one of 4 columns, BOOK and AUTHOR.
matched with ID column for AUTHOR and IDAUTHOR for BOOK
I will have an output of 8 column in7 the database if I join the two;
However getMetaData().getColumnCount() in the program gives me back 7.
Apparently of the matcher columns only one of the two tables are actually reported to the Java layer;
Is there a rule to determine which of the matcher column is going to be taken and which not?
for example rule such as " If I add first a rowset representing AUTHOR and then a rowset representing BOOK, it's ID the column to be shown and not IDAUTHOR and if I did the other way round it would be viceversa?
EDIT: yes it is I have just tried. However why? and what if there were more than 2 tables to join?
Thanks in advance.