sql SELECT and SELECT DISTINCT
The SQL SELECT satement is used to select data from a database table.
The following is the SQL SELECT syntax:
SELECT * FROM myTable
The statement will retrieve all data on all of myTable columns.
If only specified columns are to be viewed, use the following syntax:
SELECT myColumn1, myColumn2, myColumn3 FROM myTable
The SQL DISTINCT keyword returns a list of distinct values only (duplicate values are not displayed).
SQL SELECT DISTINCT syntax:
SELECT DISTINCT myColumn FROM myTable