The SELECT keyword allows us to take hold of all information from a column
or columns on a table in database. This, ofcourse, necessarily mean that there
will be redundancies. No in SQL Tutorial we will learnt that what if we only want to select each DISTINCT element
in table?
This is easy to accomplish in SQL. All we need to do is to add SQL DISTINCT after
SELECT keyword. The syntax for SQL Distinct Keyword is as follows:
For example, to select all distinct First Names in Table Employees_Salary
Table
Employees_Salary
FirstName |
Month |
Salary |
Austin |
January |
1000$ |
Austin |
February |
1100$ |
Creston |
February |
1100$ |
Kate |
February |
1100$ |
Angela |
February |
1000$ |
Bobbi |
February |
1200$ |
Cute |
February |
1300$ |