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 are the usages of sql?

0 Answers  


List the different type of joins?

0 Answers  


What are sql objects?

0 Answers  


What are the indexing methods?

0 Answers  


how to eliminate null values in a column i.e table vlaues 1 2 3 NULL 3 4 1 5 NULL i want output like this 1 2 3 3 4 1 5 i dnt want to use nvl is null and i dnt want replace the NULL value with any value i.e nvl(col,o);

11 Answers   Satyam,






How do you delete a table?

0 Answers  


What is a self join ?

6 Answers   BirlaSoft,


What are analytic functions in sql?

0 Answers  


there is A table and B table in A table there 5 rows and in b table there are 2 rows i am firing query select * from a,b what will be the output?

7 Answers   Cognizant,


Is postgresql a nosql database?

0 Answers  


How to process query result in pl/sql?

0 Answers  


what are the features and advantages of object-oriented programming? : Sql dba

0 Answers  


Categories