i have a table
col1
10
20
30
40
10
20
50
my requirement is how to retrive only duplicates like
10
10
20
20
like this how it's possible in SQL?
Answer Posted / sudheer
the below query is to get only duplicate records
i.e..,
10
10
20
20
select * from sno
where sno in (select sno from ex
group by sno
having count(sno)>1
)
and the above query is to get only
10
20
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is oci?
How do you remove duplicate values in datastage?
What are the types of containers and how to create them?
What could be a data source system?
How many types of stage?
what is the use of materialized view?
8000 jobs r there i given commit, suddenly job will abort? what happens? 2)diff b/t transformer stage & filter stage? 3)how to load the data in the source?
What is difference between join, merge and lookup stage?
Hi, what is use of Macros,functions and Routines..? At what situation you are used. If you know the answer please explain it. Thanks.
What is the use of hoursfromtime() function in transformer stage in datastage?
Can you explain repository tables in datastage?
What is the precedence of stage variables,derivations, and constraints?
How do u convert the columns to rows in datastage?
How to create a file using vi editor? 2)how to delete a file in vi editor? 3)How to connect the server datastage to unix? what r the command lines we r using? 4)30 jobs r runnig in unix i want to find out my job. how to do this? give me command?
describe the Steps to confiure a Qlogic switch