SQL SELECT DISTINCT - Overview, syntax

          

SQL SELECT DISTINCT - Overview, syntax


SELECT DISTINCT - Introduction and syntax

<<Previous  Next>>

Explain the SELECT DISTINCT statement. Write SQL syntax for the SELECT DISTINCT statement along with an example.

SELECT DISTINCT: It is used to select unique records from a table. Some tables may have duplicate values for a column. Distinct will eliminate these duplications.

Syntax:

SELECT DISTINCT column_name(s) FROM table_name

Example:

SELECT DISTINCT mobile_num FROM Employees


SQL GROUP BY

GROUP BY: It is used with aggregate functions to group the result-set by one or more columns................

SQL EXISTS

SQL EXISTS: If the subquery returns at least one row the EXISTS condition is considered "to be met"...............

SQL CONCATENATE

SQL CONCATENATE: This clause combine together (concatenate) the results from several different fields...............

SQL EXISTS

SQL EXISTS: If the subquery returns at least one row the EXISTS condition is considered "to be met"...............

SQL MINUS

SQL MINUS returns all rows in the first query that are not returned in the second query..................

<<Previous  Next>> 



Write your comment - Share Knowledge and Experience


 
Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring