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

From ZCubes Wiki
Revision as of 22:54, 4 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div"> REM REM q02.sql REM REM List the names of employees who have a dependent with REM the same first name as themselves. ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1REM
 2REM q02.sql
 3REM
 4REM List the names of employees who have a dependent with
 5REM the same first name as themselves.
 6REM
 7
 8SELECT DISTINCT fname, minit, lname
 9FROM Employee, Dependent
10WHERE ssn = essn
11  AND dependentname = fname;