How to use distinct key word in query | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

How to use distinct key word in query

5th Sep 2017, 6:37 AM
Dnyaneshwar B.Gaikwad
Dnyaneshwar B.Gaikwad - avatar
2 Respostas
+ 7
šŸ‘‰select distinct names from employee; // note : here table is employee , names is one of the field /key/column of this employee table , if u want to view all names of people but different only .. i mean not same name displayed again ... then u can use distinct in front of the name field šŸ‘‰select distinct name , roll no from student ; //note : here table is student and u want to see names of students but distict names only with roll no. also ... so u can use it //hope u got it ā˜ŗ
5th Sep 2017, 7:43 AM
Changed
Changed - avatar
0
šŸ‘‰ Column_ID 2 2 2 3 consider the above column SELECT DISTINCT Column_ID FROM TABLE_NAME output: 2 3
29th Sep 2017, 9:38 PM
Mohsin Mahmood
Mohsin Mahmood - avatar