This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Collumn names in sql request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Collumn names in sql request" Watch "Collumn names in sql request" New topic

Collumn names in sql request

Sergey Shantor

Joined: Jan 19, 2010
Posts: 3
The problem is next:
if I have to many-to-many relations and both of them directing to the same table, for example COMPANY and EMPLOYEE have the same table as ADDRESS,

how can I "single out" each address_company and address_emploуe using

SELECT address_company, address_emploуe FROM ... INNER JOIN ADDRESS ON ...

P.S.Sorry for my english if made any mistakes.
Jan Cumps

Joined: Dec 20, 2006
Posts: 2491

Hi Sergey,

we can probably help you, but you will have to make your question easier to understand.

Can you tell us which tables you try to join,
and an example of data in the tables, and how you want to show the results?

Regards, Jan

OCUP UML fundamental and ITIL foundation
youtube channel
darq Arq

Joined: Feb 11, 2010
Posts: 2
make trhe question clear.. we'l help you

subject: Collumn names in sql request
Similar Threads
JPA mapping/ERD advice
resolving many to many relatiionship
many to many jpa saving example