Tutorial SQL - SQL DISTINCT
Tue Apr 10, 2018 10:56 pm
SQL DISTINCT
Using SELECT in SQL allows you to read all data from one or more columns. This command can potentially display duplicate rows. To avoid redundancies in the results simply add DISTINCT after the word SELECT.
Basic command
The basic use of this command is then to perform the following query:
Query for Oracle
For the Oracle Database Management System (DBMS), this query is replaced by the "UNIQUE" command:
Using SELECT in SQL allows you to read all data from one or more columns. This command can potentially display duplicate rows. To avoid redundancies in the results simply add DISTINCT after the word SELECT.
Basic command
The basic use of this command is then to perform the following query:
- Code:
SELECT DISTINCT my_column
FROM table_name
Query for Oracle
For the Oracle Database Management System (DBMS), this query is replaced by the "UNIQUE" command:
- Code:
SELECT UNIQUE my_column
FROM table_name
Permissions in this forum:
You cannot reply to topics in this forum