select sal from emp group by sal

Answers were Sorted based on User's Feedback



select sal from emp group by sal..

Answer / shiva

select sal from emp group by sal;
this query group the same salary.Suppose the table contains 30
records in that same sal is 3 times repeating by using above
query it will fetch only 27 rows of sal.So it wont give the duplicate sal.

Is This Answer Correct ?    14 Yes 3 No

select sal from emp group by sal..

Answer / pankajsharma

it will fetch all the salaries one tme in case of duplicacy

Is This Answer Correct ?    3 Yes 1 No

select sal from emp group by sal..

Answer / arun karthick

select sal from emp group by sal; and select distinct sal
from emp ;
Both queries will give the same result - fetch the salary
in emp table without duplicates.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

what is csv? : Sql dba

0 Answers  


What is latest version of sql?

0 Answers  


How do you get all records from 2 tables. Which join do you use?

8 Answers   Microsoft,


Can we use update in sql function?

0 Answers  


Does inner join remove duplicates?

0 Answers  






what are the types of subquery? : Sql dba

0 Answers  


what are the forced views

6 Answers   Hexaware, TCS,


what is the use of friend function? : Sql dba

0 Answers  


How to start oracle sql developer?

0 Answers  


Give an example of Full Outer Join?

1 Answers   IBM,


What is autocommit sql?

0 Answers  


What is nosql db?

0 Answers  


Categories