I'm using postgresql, though I confirmed this in sqlfiddle.com too.
My tables and elements are:
create table Publisher(pID int PRIMARY KEY, name varchar(255), address varchar(255));
create table Book(ISBN int PRIMARY KEY, name varchar(255), genre varchar(255), price int, copies int, pID int REFERENCES Publisher(pID));
insert into Publisher values(1, 'Oxford University Press', 'Senkosova');
insert into Book values(111, 'Alamut', 'Horror', 50, 100, 1);
I want to natural join Book and Publisher and get the books which is published by Oxford University Press.
This works:
select b.name
from Book as b, Publisher as p
where b.pid = p.pid and p.name ='Oxford University Press';
This does not:
select b.name
from Book as b natural join Publisher as p
where p.name = 'Oxford University Press';
Even this does not:
select *
from Book natural join Publisher;
Why??