71.1k views
3 votes
How can you filter duplicate data while retrieving records from a table?

a) FILTER BY
b) DISTINCT
c) EXCLUDE DUPLICATES
d) UNIQUE

1 Answer

6 votes

Final answer:

To filter duplicate data while retrieving records from a table, we can use the DISTINCT keyword in a SQL query.

Step-by-step explanation:

To filter duplicate data while retrieving records from a table, we can use the DISTINCT keyword in a SQL query. When we include the DISTINCT keyword after the SELECT statement, it will remove duplicate rows from the result set, only returning unique values. For example, if we have a table called Students with a column Name, and we want to retrieve all the unique names from the table, we can use the following query: SELECT DISTINCT Name FROM Students;

User Big GH
by
8.2k points