Trending SQL Plus Discussions

Follow

Ask the Community


Ask any professional question and get answers from other specialists.

Stream language
Balaji Prakash's image
Question added by Balaji Prakash Data Analyst Systech Solutions
7 years ago

How can i fetch duplicate data's from a table?‎

I completed my graduation last year and i am getting started with SQL. can anyone help me to solve this query.  Table name is Employee and it has the following fields EM‎ ... See More

Answers:
34
Followers:
Views:
104
Vote Count:
0
Answer should contain a minimum of 25 characters.
jamal mohammed's image
Question added by jamal mohammed مبرمج +ومحاسب أقساط في شركه الخولاني الخولاني بيتي
9 years ago
Answers:
2
Followers:
Views:
186
Vote Count:
0
Answer should contain a minimum of 25 characters.
Rupesh Kumar's image  
Answer added by  Rupesh Kumar, Consultant in Oracle BRM, Cubastion Consulting Pvt. Ltd.
7 years ago

Expecting EMPNO is essential/primary key and ENAME has duplicate values then you can use following SQL. select ENAME from EMPLOYEE group by ENAME having count(ENAME) > ... See More

Nadjib Benkhellat's image  
Answer added by  Nadjib Benkhellat, Algiers, SOFTWAREENGINEERINGMANAGER at I2B
8 years ago

Sadly i can't yet understand your question!!! please clarify so i can may be help you.... are you talking about finding developers (c#,java, sql, ...) or finding any ... See More

Sebin Cheriyan's image  
Answer added by  Sebin Cheriyan, Data Analyst, Tata Consultancy Services - India
5 years ago

Use Analytical Functions (My Answer is based on Oracle). For example if you have 4 records in your Employee as follows and you want to delete duplicate records.   1 Jhon ... See More

Default profile image  
Answer added by  Deleted user
6 years ago

select EMPNO, ENAME, SAL, JOB, DEPTNO from employee group by EMPNO, ENAME, SAL, JOB, DEPTNO having count(*)>=2;

heidar yousef's image  
Answer added by  heidar yousef, Analyst Programmer & Team Leader, Municipality of Qatif Municipality - Eastern Region
6 years ago

SELECT column_name  FROM tablename GROUP BY column_name  HAVING COUNT(column_name ) > 1

Indlamuri  Hari Krishna's image  
Answer added by  Indlamuri Hari Krishna, DataBase Developer, kolla Soft pvt. ltd
6 years ago

select distinct * from employee;  

Samuel Bolaji's image  
Answer added by  Samuel Bolaji, Oracle DBA, Mahindra Comviva
6 years ago

select column1, column2..., count(columnlast) from table_name where (all_conditions_if_required) group by columnlast ------ (if it is the comlumn with duplicate data) hav ... See More

Default profile image  
Answer added by  Deleted user
7 years ago

select title, uk_release_date, count(*) from films group by title, uk_release_date having count(*) > 1;