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 Primary Key?

4 Answers   Ramco,


Is stored procedure faster than query?

0 Answers  


Show how functions and procedures are called in a pl/sql block.

0 Answers  


How many types of index are there?

0 Answers  


overloading of stored procedure is possible in oracle?

3 Answers   Nelco,






What are the datatypes available in pl/sql ?

0 Answers  


what is a sub query?how will you calculate working days in a month using sub query?

4 Answers   InteQ,


How do you determine the current isolation level? : Transact sql

0 Answers  


What is form and report?

0 Answers  


What is the mutating table and constraining table?

0 Answers  


Are stored procedures faster than dynamic sql?

0 Answers  


What version is sql?

0 Answers  


Categories