File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how i can retrieve two tables from database

 
leela mohan
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
     
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic