How reterive duplicate value in SQL?
Answers were Sorted based on User's Feedback
Answer / justus
create table emp
empid empname
----- --------
101 a
102 b
103 a
104 c
105 a
select empname from emp group by empname having count(empname)>1
Is This Answer Correct ? | 12 Yes | 2 No |
Answer / sivasiva
create table emp
empid empname
----- --------
101 a
102 b
103 a
104 c
105 a
select empid from emp groupby empid,empname having count>1
Is This Answer Correct ? | 17 Yes | 12 No |
Answer / satishkulala
select empname from emp group by empname having count(empname)>1
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / rajesh.a
select count(*),empname from emp group by empname having count(*)>1
Is This Answer Correct ? | 4 Yes | 0 No |
create table emp (empid int,empname varchar)
insert into emp values (101,'a')
insert into emp values (102,'b')
insert into emp values (103,'a')
insert into emp values (104,'c')
insert into emp values (105,'a')
select * from emp
SELECT EmpName,Count(EmpID)Cnt From Emp Group By EmpName
Having Count(EmpName) > 1
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ashish jain
create table emp
empid empname
----- --------
101 a
102 b
103 a
104 c
105 a
select empname from emp where count(empname)>1
Is This Answer Correct ? | 6 Yes | 10 No |
What are the different authentication modes in sql server? How can it be changed?
What is store procedure? How do they work?
Does sql server 2016 have ssms?
What is difference between cte and view?
How to use transact-sql statements to access the database engine?
What is Inner Join?
What is temporary table in sql server? Why we use temp table?
What happens if you delete a table that is used by a view?
What is the difference between createstatement and preparedstatement?
What are the difference between “where” and “having” clause in sql server?
In my application I have a process which picks the scanned files (tif format) from a shared location and it links to application and shown on it.The actuall issue is that my process picks the file before it is completly written or scanned which results in displaying few parts of the image or incomplete image.I need to check if the file is not completly scanned or written then do not link it to application.Please help if any body tell me that how can i check that file is in written phase or locked through DTS.thanking you in advance
Explain how many normalization forms?