I get am empty set when I enter this SQL statement, could someone please tell me why?
select ayr,mods.mid,mtitle,credits
from mods,comp
where mods,mid = comp.mid and ayr = 2001/02;
It displays the right thing when omitting 'ayr = 2001/02'.
I get am empty set when I enter this SQL statement, could someone please tell me why?
select ayr,mods.mid,mtitle,credits
from mods,comp
where mods,mid = comp.mid and ayr = 2001/02;
It displays the right thing when omitting 'ayr = 2001/02'.
You need quotes around the date
select ayr,mods.mid,mtitle,credits
from mods,comp
where mods,mid = comp.mid and ayr = '2001/02';
Are you sure that after the where
clause it should be mods,mid
instead of mods.mid
, table name is not entered in the correct way after SELECT
statement
As per my suggestion you should enter mods.mid
Try this Syntax:-
select ayr,mods,mtitle,credits from mods,comp where mods.mid = comp.mid and ayr = 2001/02;
Post the output