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 is DCL?
Can we deploy SSRS reports on our personal website?
What is single-user mode and what are the steps you should follow to start sql server in single-user mode?
What is the usage of sign function?
List some case manipulation functions in sql?
State the difference between union and union all?
Explain what are the database objects? : SQL Server Architecture
Explain nested trigger in sql?
Do you know what is openxml in sql server?
What is the difference between the 2 operating modes of database mirroring?
What is the difference between drop table and truncate table?
What is recompile sql server?
Explain the various types of concurrency problem?
In one interview...interviewer ask me question pleas tell me sql server architecture.. can any body tell me the sql server architecture with digram
What is difference between cte and view?