Software Testing Material

A site for software testers. We provide free online tutorials on Manual Testing, Automation Testing - Selenium, QTP, LoadRunner, Testing Tools and many more.

  • Blog
  • Tutorials
    • Manual Testing
    • Java
    • Selenium
      • TestNG
      • Maven
      • Jenkins
    • Framework
    • Katalon
    • Agile
    • SQL
    • VBScript
    • API Testing
  • Tools
    • TestLodge
    • FrogLogic GUI Tool
    • CrossBrowserTesting
    • BrowserStack
    • TestCaseLab
    • Kobiton
    • Sikuli
    • Postman
  • Interview Q & A
    • Selenium
    • TestNG
    • Test Framework
    • Explain Framework
    • Manual Testing
    • Software QA
    • Agile
    • Testing As A Career
    • General Interview Questions
    • API Testing
    • SOAP
  • Free Resources
  • Guest Post
    • Guest Post Guidelines
  • Training

SQL SELECT DISTINCT Statement – SQL TUTORIAL | Software Testing Material

Last Updated on March 1, 2018 by Rajkumar

SQL Select Distinct:

SQL SELECT DISTINCT query is used to return only unique values. It eliminates all the duplicated values.

Syntax:

1
SELECT DISTINCT column_name,column_name FROM table_name;

Example:

1
SELECT DISTINCT Fours FROM SCOREBOARD;

In the below image, you could find two SELECT queries.

Total number of records displayed in the result are 3 related to the first SELECT query whereas the total number of records displayed in the result are 2 related to the second SELECT query. We used a DISTINCT keyword in the second SELECT query, so all the duplicate values are eliminated and returned only the unique values.

SQL SELECT DISTINCT

In the next tutorial, we will see Union & Union All In SQL

Check out the complete SQL Tutorial by clicking on below link:

SQL Tutorial – Complete

SUBSCRIBE TO GET FREE EBOOK AND REGULAR UPDATES ON SOFTWARE TESTING

Filed Under: SQL

data-matched-content-rows-num="2" data-matched-content-columns-num="3"
Previous Article:
SQL UNION CLAUSE AND UNION ALL CLAUSE – SQL TUTORIAL | Software Testing Material
Next Article:
SQL WHERE CLAUSE – SQL TUTORIAL | Software Testing Material

About the Author

Rajkumar SM is a founder of SoftwareTestingMaterial. He is a certified Software Test Engineer by profession and blogger & youtuber by choice. He has an extensive experience in the field of Software Testing. He writes here about Software Testing which includes both Manual and Automation Testing. He loves to be with his wife and cute little kid 'Freedom'.

Comments

  1. Rohan says

    March 1, 2018 at 3:16 am

    Finds a bug please refer attached Screenshot.

    • Rajkumar says

      March 1, 2018 at 6:10 am

      Thanks for pointing out Rahul. Will modify it.

ADVERTISEMENT

Froglogic-Squish-GUI-Tester
CrossBrowserTesting

TUTORIALS

  • Manual Testing Tutorial
  • Selenium Tutorial
  • TestNG Tutorial
  • VBScript Tutorial
  • Agile Methodology
  • SQL Tutorial for Testers
  • INTERVIEW QUESTIONS

  • Framework Interview Questions
  • Real Time Manual Testing
  • 100 Top Selenium Interview Questions
  • 30 Top TestNG Interview Questions
  • Agile Interview Questions
  • 80 SQL Interview Questions
  • TESTING TOOLS

  • Test Lodge
  • FrogLogic Squish
  • Cross Browser Testing
  • BrowserStack
  • Test Case Lab
  • Sikuli
  • © 2019 www.softwaretestingmaterial.com | About us | Privacy Policy | Contact us | Guest Post | Disclaimer | Terms of use | Sitemap