SQL Distinct statement in database systems

What is SELECT DISTINCT statement?

It shows common values only one time from the given table.

RollNo Name Fee
1 Sameed 10,000
2 Shahzeb 20,000
3 Sameed 10,000

Table 1: student

Example 1:

Query on table 1: SELECT DISTINCT Name FROM student;

Result:

Name
Sameed
Shahzeb

Query show the resultant table: student

 

 

By: Prof. Fazal Rehman Shamil    CEO @ T4Tutorials.com
Whatsapp: +92 302 87 000 85     Facebook: For Discussions

Leave a Reply

Your email address will not be published. Required fields are marked *