There are two tables which have a relation via a distinct so called PK.
Email Gender
a@a.cn 12345
b@b.cn 12365
PK String
12345 MALE
12365 FEMALE
What would a query look like to get E-Mail and the String of the gender?
select
user.Email,
users.Gender
from
users,
values
You will want to
JOINthe two tables. My suggestion would be to use ANSIJOINsyntax likeINNER JOINorLEFT JOINinstead of using a comma between the tables, similar to this:See SQL Fiddle with Demo
If you are confused about
JOINsyntax, here is a great visual explanation of joins