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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now