This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Iterate through columns in tables. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Iterate through columns in tables." Watch "Iterate through columns in tables." New topic
Author

Iterate through columns in tables.

Koos Kombuis
Greenhorn

Joined: Mar 10, 2009
Posts: 5
Hi guys,

I'm a bit stuck here, I'm not that comfortable with SQL and would like to get a push into the right direction.

What I'm trying to do is, compare Java fields via reflection to those in an Oracle DB.

The reflection part isn't the problem though..

How will I go about it to get a table with a given name and loop through all the columns/fields inside the specified table?

Thanks in advance.
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3749
    
  10

getMetaData is your friend.


[OCA 8 Book] [Blog]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Iterate through columns in tables.
 
It's not a secret anymore!