select sal from emp group by sal

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how many triggers are allowed in mysql table? : Sql dba

556


What is primary key and unique key?

542


How does sql profiler work?

568


Why use stored procedures?

568


Which language is used in sql?

518






What is difference between nchar and nvarchar?

540


what is 'mysqlshow'? : Sql dba

586


When are we going to use truncate and delete?

549


How do you pronounce sql?

547


What is varchar example?

574


Which normal form is best?

513


What is the function that is used to transfer a pl/sql table log to a database table?

553


Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?

618


What are the constraints available in sql?

578


What is a natural join sql?

511