Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JDBC and Relational Databases
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JDBC and Relational Databases
how to retrieve values from more than two tables
Mohd Nayeemuddin
Greenhorn
Posts: 4
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
hai,
how to retrieve values into the ResultSet object from more than two tables by establishing a relation. Please solve my query with an example.
Thank Q.
Regards...
Nayeem
Paul Sturrock
Bartender
Posts: 10336
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Return a result set that is created from some sort of join.
For example, assuming:
create table tableA { id integer primary key, name varchar(30) } create table tableB { id integer primary key, someValue integer, tableA_id integer constraint fk_tableA references tableA(id) }
You can write a query like this:
select * from tableA inner join tableB on tableB.tableA_id = tableD.id
which will return all records in tableA that also have a related tableB record.
JavaRanch FAQ
HowToAskQuestionsOnJavaRanch
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
retrieve data frm database
Confusion when joining two tables
Joins
hibenrate Query...
HQL doubt.
More...