Results 1 to 3 of 3
  1. #1
    Join Date
    May 2008

    Question Unanswered: querying across 2 tables

    Hi all,
    I've two tables, A and B. In both of them I've a column called pk_id. In table A there is a collumn called pk_type and in table B there is a column called pm_family.
    consider the following queries

    SELECT pk_id as pkid, pk_name FROM A
    WHERE pk_type IN (1, 4);

    select pk_id from B where pm_family = 0;

    I want to join the above queries and get a resultset. The purpose is to capture the list of pk_id, pk_name from A where the pm_family in B for the pk_id in A is 0.

    Oracle version : 8i

    Please let know if nay other details is needed


  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    STRIKE 2!

    You should read & follow posting guidelines as stated in #1 STICKY post as stated in URL below

    You'll find many find coding examples on
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jan 2004
    Croatia, Europe
    Provided Answers: 5
    Now this is an example of a simple join between two tables.

    Did you learn about joins? If not, you should. As it seems that there's nothing special in your problem, perhaps you should try it yourself first, and then - if you still have problems - come back and explain what went wrong. Spoonfeeding wouldn't bring any good in this case, I'm afraid.

Posting Permissions

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