Previous Topic: Eliminating Duplicate RowsNext Topic: Organizing Data


Exercise 3-6

Now You Try It

The Accounting department needs a list of communities represented by employees in this company in order to identify applicable city taxes. One of the columns in the EMPLOYEE table contains the name of the community in which the employee resides. Enter a SELECT statement to list the communities in the table without showing any duplicates.

The result looks like this:

 CITY  ----  Boston  Brookline  Camden  Canton  Concord  Dedham  Grover  Medford  Natick  Newton  Stoneham  Taunton  Wilmington  13 rows processed

If your results do not match what you see above, check Review Answers for Chapter 3 for the correct SQL syntax. Remember that result tables may be shortened in this guide.