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 mean by forward declaration and where we'll use it.

4 Answers   TCS,


what is sql optimization

1 Answers   Fidelity,


What is an invalid partition table?

0 Answers  


Explain the uses of database trigger.

0 Answers  


Explain correlated query work?

0 Answers  






How do you explain an index number?

0 Answers  


What is data control language (dcl)?

0 Answers  


Write the order of precedence for validation of a column in a table ?

2 Answers  


What is difference between select statement and cursor

3 Answers   JDA,


how to get a list of all tables in a database? : Sql dba

0 Answers  


How do I count rows in sql query?

0 Answers  


What is sql and also describe types of sql statements?

0 Answers  


Categories