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 |
Is sql a backend language?
Which are the different types of indexes in sql?
Who is the owner of mysql database?
What are the datatypes a available in PL/SQL ?
How do you rank data in sql?
Which is the best place to learn hadoop?
What is compiled query?
How do I find duplicates in sql?
what is autonomouse transaction?
Does sql*plus have a pl/sql engine?
what is the difference between a web-garden and a web-farm? : Sql dba
What is online transaction processing (oltp)?
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)