0

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'.

Shadow
  • 33,525
  • 10
  • 51
  • 64

2 Answers2

1

You need quotes around the date

select ayr,mods.mid,mtitle,credits 
from mods,comp 
where mods,mid = comp.mid and ayr = '2001/02';
travgm
  • 141
  • 7
0

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