Yurttas/PL/DBL/mssql/F/01/Company-A/q02.sql

From ZCubes Wiki
Jump to navigation Jump to search
 1/*
 2REM
 3REM q02.sql
 4REM
 5REM List the names of employees who have a dependent with
 6REM the same first name as themselves.
 7REM
 8*/
 9
10SELECT DISTINCT fname, minit, lname
11FROM Employee, Dependent
12WHERE ssn = essn
13  AND dependentname = fname;