posted 20 years ago
hi,
I need help for a sql query, i have 2 tables.
table a: studentid sname
table b: studentid, studentNumber.
sometimes same studentid has 1 or more studentnumbers.
I need to display studentid,studentnumber,sname
when I join I always get multiple rows of same student because the student has more than 1 student number. I want to get only one studentnumber if the student has more. how can i do that. I used distinct keyword but the rows are not actually different.
thanks,