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
What are the different Authentication modes in SQL Server and how can you change authentication mode?
What is normalization? What number of normalization shapes are there?
What is a rollup clause?
How do I completely remove sql server instance?
Explain multiserver query
Where sql server user names and passwords are stored in sql server? : sql server database administration
What is the definition for sql server 2000?
Can truncate be rolled back?
Difference between group by clause and having clause in SQL?
What are the new scripting capabilities of ssms? : sql server management studio
What is data modeling and Reterminal integrity?
What is logon trigger?
What are the types of database schema? : sql server analysis services, ssas
How ssrs maintain security?
Please explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?