select fname,lname,salary from employee where exists
(select essn from dependent where employee.sex = dependent.sex);
this is the query
select fname,lname,salary from employee where exists
(select essn from dependent where employee.sex = dependent.sex);
this is the query
Copyright © 2021 Jogjafile Inc.
Nicer SQL, avoiding
exists:Nicer nicer SQL, but only works if
sexis the only column in common between tablesemployee, dependentRelational Algebra Appendix A style (with the same proviso)
Relational Algebra Codd 1972 style (with the same proviso)
< >, because subscripting doesn't work in SO's code.)