#sql #sqltips #sqlinterview #sqlinterviewquestions #infosys #removeduplicates
Hey, Everyone welcome back. So, today in this video we will learn about
How To Remove Duplicate Records From Table📑In SQL
🟢SQL QUERY USED FOR THIS VIDEO:-
---------------------------------------------------------------------------
CREATE DATABASE TEST;
USE TEST;
CREATE TABLE EMPLOYEE
(
ID Int,
FIRST_NAME varchar(50),
LAST_NAME varchar(50),
[ADDRESS] varchar(50)
);
SELECT * FROM EMPLOYEE;
INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME,[ADDRESS])VALUES (1,'Deepan','Kumar','Odisha');
INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME,[ADDRESS])VALUES (2,'Deepan','Kumar','Odisha');
INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME,[ADDRESS])VALUES (3,'Deepan','Kumar','Odisha');
INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME,[ADDRESS])VALUES (4,'Deepan','Gadkare','Odisha');
INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME,[ADDRESS])VALUES (5,'Niraj','Patel','West_Bengal');
INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME,[ADDRESS])VALUES (6,'Niraj','Patel','West_Bengal');
INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME,[ADDRESS])VALUES (7,'Deepika','Naik','Keral');
INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME,[ADDRESS])VALUES (8,'Ankita','Agarwal','UP');
SELECT * FROM EMPLOYEE;
SELECT * FROM EMPLOYEE;
DELETE FROM EMPLOYEE
WHERE ID NOT IN
(
SELECT MIN(ID) FROM EMPLOYEE
GROUP BY FIRST_NAME,LAST_NAME,[ADDRESS]
)
------------------------------------------
👋 Additional resources
-------------------------------------------
Top 100 Most Commonly Asked SQL Interview Questions and Answers [ Part-1 ] #sql
• Top 100 Most Commonly Asked SQL Inter...
Top 100 Most Commonly Asked SQL Interview Questions and Answers [ Part-2 ] #sql
• Top 100 Most Commonly Asked SQL Inter...
Introduction To SQL Server [ What is Database ]:-
• Introduction To SQL Server [ What is ...
What is DBMS || Database Management System [ In Hindi ]:-
• What is DBMS || Database Management S...
What is RDBMS ( Relational Database Management System ):-
• What is RDBMS ( Relational Database M...
Database Recovery From MDF And LDF File Using GUI:-
• Database Recovery From MDF And LDF Fi...
2 Methods To Create LOGIN In SQL Server:-
• 2 Methods To Create LOGIN In SQL Serv...
How To Create a New Login/User In SQL Server:-
• How To Create a New Login / User In S...
How To Delete/Drop LOGIN In SQL Server:-
• How To Delete/Drop LOGIN In SQL Serve...
Complete Guide For Import CSV File To #SqlServer Database (Step-By-Step Along With #ERROR & Solution;-
• Complete Guide For Import #CSV File T...
🔔 Subscribe to my YouTube channel:-
https://www.youtube.com/channel/UCWfz...
Social Media Link
--------------------------------
LinkedIn:- / deepan-kumar-patel-777591202
Facebook:- https://www.facebook.com/dipan.patel....
---------------------------------------------------------------------------------------------------------
Thanks for watching...
"Milestone Creator"
Watch video Infosys SQL Interview Question✅[ Remove Duplicate Records From Table📑In SQL ] online without registration, duration hours minute second in high quality. This video was added by user MilEstOne CrEaTor 17 September 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 54 once and liked it 1 people.