File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Joins Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Joins" Watch "Joins" New topic


Kris Reid
Ranch Hand

Joined: Jan 05, 2005
Posts: 247
Best explained with code

How do you know which "field" you are getting from the resultSet?
How do you specify which "field" you want?
i.e. rs.getString("tableOne.field");
Sri Ram
Ranch Hand

Joined: Oct 03, 2005
Posts: 118
what u can do is, give a virtual column name and then getString based on that name.
Sample Code.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63866

"Sriram TA",

There aren't may rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Forum Bartender

[Asking smart questions] [About Bear] [Books by Bear]
Kris Reid
Ranch Hand

Joined: Jan 05, 2005
Posts: 247
Didn't even think of Aliases!

I agree. Here's the link:
subject: Joins
It's not a secret anymore!