How do I write a SQL statement that proves the functional dependency A → B holds given a relation with attributes ABCD knowing that no record has NULL values?
SELECT * from R r1, R r2 where r1.A=r2.A and r1.B <> r2.B
This should return an empty set if the FD holds.