Member Avatar

Recently I tried many ways to retrive two columns from database.
First I'll explain my database structure:

Module Table

Lesson Table

I want to retrive mod_id,name from module table.
I used this select query to do that :

select md.mod_id as 'mdid', as 'nme' from module md,lesson ls where md.mod_id=ls.mod_id and ls.semester='1' and ls.faculty='School of Computing' and ls.year='1'
Result is like this:
105| c#
105| c#

But results should be

mdid| nme
101| CA
105| c#

please help me to correct this wrong. I'm stucked....

I want to retrive mod_id,name from module table

SELECT mod_id, name FROM Module