Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2006
    Posts
    9

    Unanswered: Retrieving data from another table with a given ID

    http://i9.tinypic.com/2ynoyva.png

    [Note: Ignore the duplicates, I was being careless.]

    I want to know which command I would use, giving it "54352345" and have it return "FDSA."

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    SELECT column_2
    FROM the_table
    WHERE column_1 = 54352345

  3. #3
    Join Date
    Nov 2006
    Posts
    9
    Excellent. If the given ID was nowhere to be found in column_1, what would it return? Null?

  4. #4
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    It would return no rows at all

    Don't understand me wrong: but before doing any further work you should read a good tutorial on database concepts and the SQL language

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by shammat
    It would return no rows at all

    Don't understand me wrong: but before doing any further work you should read a good tutorial on database concepts and the SQL language
    ..good point, well made, Rudy's (r937) site has a good article from Paul Litwin that might be of interest
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •