select sal from emp group by sal

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we debug stored procedure?

519


what is msql? : Sql dba

562


how to create a test table in your mysql server? : Sql dba

494


What are actual parameters and formal parameters?

567


what is acid property in database? : Sql dba

559






Why do we need a foreign key?

548


What is an exception in pl/sql?

544


What is pragma in pl sql?

599


What are the different types of dbms?

547


Is there any restriction on the use of union in embedded sql?

672


What are different types of triggers?

555


Can we connect to postgresql using sql developer?

484


what is the difference between cluster and non cluster index? : Sql dba

551


Is a secondary key the same as a foreign key?

488


Are null values same as that of zero or a blank space?

531