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 are the usages of sql?
List the different type of joins?
What are sql objects?
What are the indexing methods?
how to eliminate null values in a column i.e table vlaues 1 2 3 NULL 3 4 1 5 NULL i want output like this 1 2 3 3 4 1 5 i dnt want to use nvl is null and i dnt want replace the NULL value with any value i.e nvl(col,o);
How do you delete a table?
What is a self join ?
What are analytic functions in sql?
there is A table and B table in A table there 5 rows and in b table there are 2 rows i am firing query select * from a,b what will be the output?
Is postgresql a nosql database?
How to process query result in pl/sql?
what are the features and advantages of object-oriented programming? : Sql dba