Select question.

Results 1 to 2 of 2

Thread: Select question.

  1. #1
    Join Date
    Dec 1969

    Default Select question.

    Here is my problem. I have 2 tables: Person and person_info. Person_id is a primary key. I need to select all people from Person table who have same first and last name and also have the same age in the person_info table.<BR>Please help.

  2. #2
    Join Date
    Dec 1969

    Default So you want to find all the...

    "John John" and "Mary Mary" people? "...same first and last name..."???<BR><BR>Or do you mean you just want to match people in Person table with people in Person_Info table? <BR><BR>I *have* to ask how come you don&#039;t have Person_id as the foreign key in the Person_Info table. If you had that you wouldn&#039;t need anything else, would you?<BR><BR>Oh, well:<BR><BR>SELECT Person.* FROM Person, Person_Info<BR>WHERE Person.FirstName = Person_Info.FirstName<BR>AND Person.LastName = Person_Info.LastName<BR>AND Person.Age = Person_Info.Age<BR>ORDER BY Person.LastName, Person.FirstName<BR><BR><BR><BR>

Posting Permissions

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