tutorial net
*********WOOOOOOW *********
We're happy to see you're enjoying our races (already 5 pages viewed today)! You can keep checking out by becoming a member of the tutorial net community. It's free!

You will also be able to keep track of your race progress, practice on exercises, and chat with other members.

Share
Go down
Admin
Posts : 200
Join date : 2017-11-11
Age : 27
Location : algeria
View user profilehttp://www.tutorial-net.com

Tutorial SQL - SQL DISTINCT

on 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:

Code:
SELECT DISTINCT my_column
FROM table_name
This query selects the "my_column" field in the "table_name" table, avoiding duplicate returns.

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
Back to top
Permissions in this forum:
You cannot reply to topics in this forum