wood burning stoves*
The moose likes JDBC and the fly likes how i can  retrieve two tables from database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how i can  retrieve two tables from database" Watch "how i can  retrieve two tables from database" New topic
Author

how i can retrieve two tables from database

leela mohan
Greenhorn

Joined: Oct 31, 2006
Posts: 13
suppose the two tables have the same like this
one table is
create table StudentAdmissionTable
(
Std_AdmNumber Number,
Std_Wing varChar2(10),
Std_Class varChar2(10),
Std_Section varChar2(5),
Std_RollNo varChar2(10),
Std_AcadYear Date,
std-name varchar2(8)
);

another table is
create table FeeDetailsTable
(
Std_AdmNumber Number,
Term1 Number,
Term2 Number,
Term3 Number,
Due_Date_term1 Date,
Paid_Date_term1 Date);
so please tell me
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You have two choices:
  • issue two select statements, selecting all you need from each table
  • create a query joining the results from both tables

  • Which is it you want to do?


    JavaRanch FAQ HowToAskQuestionsOnJavaRanch
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: how i can retrieve two tables from database
     
    Similar Threads
    update while doing save in hibernate
    i m working on sevlet in that i have to retrieve two values from data table
    Stored Procedure
    Join In HSQL