• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Joins

 
Kris Reid
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what u can do is, give a virtual column name and then getString based on that name.
Sample Code.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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.

Thanks!
bear
Forum Bartender
 
Kris Reid
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Didn't even think of Aliases!

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic