army20 Posted April 19, 2006 Posted April 19, 2006 (edited) Hello everyone !I'm using MySQL 5.0.15 on a local windows xp machine.Here are my talbesinfo_tbl:-----------------------------NM_PK RANK NAME123 1 Him 234 2 Her 456 3 Us -----------------------------rank_tbl:-----------------------------RANK_NB RANK_NAME1 Low 2 Medium3 High-----------------------------Let's say that I want to diaplay data from info_tbl but instead of having numbers for the filed RANK I want to display RANK_NAME that is from another table. How to do this ? Edited April 19, 2006 by army20
Dutchdre Posted April 21, 2006 Posted April 21, 2006 Something like this? SELECT info_tbl.NM_PK, rank_tbl.RANK_NAME, info_tbl.NAMEFROM info_tbl INNER JOIN rank_tbl ON info_tbl.RANK = rank_tbl.RANK_NB;
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now