a simple problem with natural join
208428Mar 3 2006 — edited Mar 6 2006i have 2 tables what have columns with distinct's names are referenced.
natural join not works 'cose only foreign key reference this 2 tables.
Have something to make table join in using an specific foreign key??
I'm using oracle9i
Example:
table a( a_cod number, a_name varchar2(20))
table b( b_cod number, b_month_year date, b_salary number)
ALTER TABLE b ADD ( CONSTRAINT b_a_FK FOREIGN KEY (b_cod)
REFERENCES a (a_cod));
select * from a natural join b
where trunc(b_month_year) = trunc(sysdate)