This SQL statement used to retrieve unique(different) values. Sometimes a database table contains many duplicated value and if we want to retrieve all duplicated values in single from then we can use this SQL statement. It returns all different values from table.
Syntax –
SELECT DISTINCT column1,column2,column3,…. FROM table_name ;
Example:
Lets tale a table 'Orders'.
The following SQL statement is select the Unique values from OrderName column in Orders table.
Select Multiple column unique value from Orders table.
The following SQL statement is lists the number of different Id from Orders table-
This statement will returns the number of different column values from database table.
This SQL statement used to retrieve unique(different) values. Sometimes a database table contains many duplicated value and if we want to retrieve all duplicated values in single from then we can use this SQL statement. It returns all different values from table.
Syntax –
SELECT DISTINCT column1,column2,column3,…. FROM table_name ;
This SQL statement used to retrieve unique(different) values. Sometimes a database table contains many duplicated value and if we want to retrieve all duplicated values in single from then we can use this SQL statement. It returns all different values from table.
This SQL statement used to retrieve unique(different) values. Sometimes a database table contains many duplicated value and if we want to retrieve all duplicated values in single from then we can use this SQL statement. It returns all different values from table.
Syntax –
select distinct column1,column2,column3,…. from table-name ;
Example:
Lets tale a table 'Orders'.
The following SQL statement is select the Unique values from OrderName column in Orders table.
Select Multiple column unique value from Orders table.
The following SQL statement is lists the number of different Id from Orders table-
This statement will returns the number of different column values from database table.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Select Unique data from table-
This SQL statement used to retrieve unique(different) values. Sometimes a database table contains many duplicated value and if we want to retrieve all duplicated values in single from then we can use this SQL statement. It returns all different values from table.
Syntax –
SELECT DISTINCT column1,column2,column3,…. FROM table_name ;
Example:
Lets tale a table 'Orders'.
The following SQL statement is select the Unique values from OrderName column in Orders table.
Select Multiple column unique value from Orders table.
The following SQL statement is lists the number of different Id from Orders table-
This statement will returns the number of different column values from database table.
Select Unique data from table-
This SQL statement used to retrieve unique(different) values. Sometimes a database table contains many duplicated value and if we want to retrieve all duplicated values in single from then we can use this SQL statement. It returns all different values from table.
Syntax –
SELECT DISTINCT column1,column2,column3,…. FROM table_name ;
Select Unique data from table-
This SQL statement used to retrieve unique(different) values. Sometimes a database table contains many duplicated value and if we want to retrieve all duplicated values in single from then we can use this SQL statement. It returns all different values from table.
Syntax –
Select Unique data from table-
This SQL statement used to retrieve unique(different) values. Sometimes a database table contains many duplicated value and if we want to retrieve all duplicated values in single from then we can use this SQL statement. It returns all different values from table.
Syntax –
Example:
Lets tale a table 'Orders'.
The following SQL statement is select the Unique values from OrderName column in Orders table.
Select Multiple column unique value from Orders table.
The following SQL statement is lists the number of different Id from Orders table-
This statement will returns the number of different column values from database table.