+ 1
How to use distinct key word in query
2 Réponses
+ 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 ☺
0
👉 Column_ID
2
2
2
3
consider the above column
SELECT DISTINCT Column_ID FROM TABLE_NAME
output:
2
3