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

Explain what are commit and rollback in sql?

0 Answers  


Can I remove the default constraint columns in SQL SERVER?

5 Answers   Value Labs,


How to link up the text file to a Database table?

2 Answers   Allianz,


What is the difference between grant and with grant while giving permissions to the user?

0 Answers  


How to run sql server 2005 books online on your local system?

0 Answers  


Do you know the isolation level that sql server support?

0 Answers  


What are distributed partitioned views?

0 Answers  


Can foreign key be duplicate?

0 Answers  


can any one answer this query,thank you in advance Table 1 has 2 columns: EmployeeId, T shirtsize(values can be 1,2,3) Table 2 has 2 columns: EmployeeId, Region Write SQL to Find the region which has the largest number of people with Tshirt size=3

15 Answers   Google,


How to delete particular value in the column of a table.Is it possible or not?if possible give it as in query.

8 Answers   Intelenet,


How to get the definition of a user defined function back?

0 Answers  


What is global temp table?

0 Answers  


Categories