Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Retrieve data from other table

  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Retrieve data from other table

    Hi,
    I have 2 tables contain data
    how can i retrieve from 2nd table data by using 1st table id which z primary key in 1st table and forn key to 2nd table..
    plz help me...


  2. #2
    Member
    Join Date
    Jun 2011
    Location
    Rhode Island
    Posts
    69
    My Mood
    Bored
    Thanks
    11
    Thanked 7 Times in 6 Posts

    Default Re: Retrieve data from other table

    use the join on the tables.
     String s = "select * from (tableA , tableB) on tableA.z = tableB.x"

    mysql join reference

  3. #3
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Retrieve data from other table

    Hello kichkich,

    Welcome to the Java Programming Forums.

    This link should help you - Copy One Database Table to Another : TableDatabase SQL JDBCJava

    Let us know if you get stuck.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. Replies: 2
    Last Post: June 15th, 2011, 03:49 PM
  2. Replies: 1
    Last Post: June 11th, 2011, 05:39 AM
  3. Retrieve coordinates of other windows
    By Knox in forum AWT / Java Swing
    Replies: 1
    Last Post: April 10th, 2011, 02:03 PM
  4. [HELP] How can I retrieve attribute/method?
    By k4it0xtr3me in forum Object Oriented Programming
    Replies: 0
    Last Post: January 21st, 2011, 02:18 AM
  5. Replies: 0
    Last Post: April 15th, 2010, 05:13 AM