Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How reterive duplicate value in SQL?

Answers were Sorted based on User's Feedback



How reterive duplicate value in SQL?..

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

How reterive duplicate value in SQL?..

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

How reterive duplicate value in SQL?..

Answer / satishkulala

select empname from emp group by empname having count(empname)>1

Is This Answer Correct ?    5 Yes 0 No

How reterive duplicate value in SQL?..

Answer / rajesh.a

select count(*),empname from emp group by empname having count(*)>1

Is This Answer Correct ?    4 Yes 0 No

How reterive duplicate value in SQL?..

Answer / jaleel ahamed s

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

How reterive duplicate value in SQL?..

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

Post New Answer

More SQL Server Interview Questions

How can count the string ? for ex: If i have string like 'bhaskar' then i need like b:1 h:1 a:2 s:1 k:1 r:1 please give any idea on that

9 Answers   TCS,


How can u get the number of pupils connecting the database?

1 Answers   Cap Gemini,


What is fill factor and pad index?

0 Answers  


What are a scheduled jobs or what is a scheduled tasks?

0 Answers  


What changes in the front end code is needed if mirroring is implemented for the high availability? : sql server database administration

0 Answers  


Explain the different types of joins?

0 Answers  


How you can move data or databases between servers and databases in sql server?

0 Answers  


What do you understand by physical_only option in dbcc checkdb?

0 Answers  


What is bit datatype and what's the information that can be stored inside a bit column?

1 Answers  


Explain following error properties?

0 Answers  


what is physical sort data and logical sort data in index?

2 Answers  


What is Outter Join?

1 Answers  


Categories