Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am sure this is simple but... 1

Status
Not open for further replies.

jshurst

Programmer
Oct 27, 2004
1,158
US
I am trying to write a simple query.
Example:
Code:
select animalid, citizenid from animal
where cageid = 4
The citizenid is also a primary key in a Citizen table. If this is not NULL then I would like to be able to return a firstname, and lastname from the citizen table (I really don't care anything about returning the citizenid - just the names). Can someone help me here? Thanks.
 
Wow, that was a bit more complicated than I thought. I'm kinda new to SQL and have never used an outer join before. Looks like I need to do some reading. Thanks.
 
Good Luck..... BOL is the best tool to read.

Good Luck
Gopala Krishna Kakani

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top