select sal from emp group by sal
Answers were Sorted based on User's Feedback
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 |
Answer / pankajsharma
it will fetch all the salaries one tme in case of duplicacy
| Is This Answer Correct ? | 3 Yes | 1 No |
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 |
What is the usage of when clause in trigger?
Explain what is sql*plus?
How do I find duplicates in a single column in sql?
What is difference between joins and union?
How do I create a memory optimized filegroup?
What is recursive join in sql?
How is sql used in oracle?
What is a sql schema used for?
How can I delete duplicate rows?
What is left join example?
how would you get the current date in mysql? : Sql dba
What do you understand by exception handling in pl/sql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)