i want only duplicates rows from coloumn
ex. emp_id(colomn name)1,1,2,3,3,4,5,5.
so i want only duplicates no.
Answer Posted / chinna_g
You have 'emp' table with empid,empname,empsal.
With values:
1 row:1,'hhh',10000
2 row:2,'nnn',10000
3 row:3,'vvv',15000
4 row:4,'jjj',10000
A)
In this table you have sal column 10000 repeating 3 times
in the table, if you want to retrieve the repeated values
i.e. the salary column with 3 times to be displayed in the
following query:
"select empsal from emp where empsal in(select empsal from
emp group by empsal having count(empsal)>1);"
Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
Where sql server usernames and passwords are stored in a sql server?
What is open database communication (odbc)?
What are information schema views?
can an order by clause be used in a creation of a view?
What are temporal tables in sql server 2016?
What is sharding?
Suggest a method of joining two tables.
Can we use where clause with group by?
what's new in sql server 2016?
Please explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?
What is fill factor and pad index?
You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?
What is a sql join?
Explain the truncate command? : SQL Server Architecture
Explain indexing and what are the advantages of it?