jim.davidson Posted September 14, 2012 Share Posted September 14, 2012 I would like to create a list from two tables First Table members table member_id 10 int member_first_name 25 text member_last_name 30 text Second table id_tags table tag_id 10 int tag_number 5 text member_id 10 int from (members table) The list would have the name from the members table and the tag number from the id_tags table How do I write the join? Also some members do not have an id tag but I want them in the list too. Any and all help will be greatly appreciated! Quote Link to comment Share on other sites More sharing options...
xyph Posted September 14, 2012 Share Posted September 14, 2012 SELECT m.member_first_name, m.member_last_name, t.tag_number FROM members m LEFT JOIN id_tags t USING (member_id) Quote Link to comment Share on other sites More sharing options...
jim.davidson Posted September 14, 2012 Author Share Posted September 14, 2012 Thank you very much! That did it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.