Hello,
Suppose I have two tables: A and B.
I would like to create a SELECT query that gives me two fields from table A and the rest of the fields from table B without specifying the columns names of table B?
The reason I need this is this: In table A I have the user's first and last name and in table B I have the rest of it's data. The thing is that each time table B will be a different table with different columns in it, that's why I want to avoid specifying the names. In table A it will always be the same two fields. Now, I cannot do simply SELECT * because table A and B have one field in common which will cause ambiguously.
I am building this query dynamically in my Java code and concatenate table B name there, depending on the user's choice.
Suppose I have two tables: A and B.
I would like to create a SELECT query that gives me two fields from table A and the rest of the fields from table B without specifying the columns names of table B?
The reason I need this is this: In table A I have the user's first and last name and in table B I have the rest of it's data. The thing is that each time table B will be a different table with different columns in it, that's why I want to avoid specifying the names. In table A it will always be the same two fields. Now, I cannot do simply SELECT * because table A and B have one field in common which will cause ambiguously.
I am building this query dynamically in my Java code and concatenate table B name there, depending on the user's choice.