--Table Schema
CREATE TABLE Test(
ID INT,
FirstName Varchar(100),
LastName Varchar(100),
Country Varchar(100) );
Insert into Test (FirstName,LastName,Country)values('Raj','Gupta','India'),
('Raj','Gupta','India'),
('Mohan','Kumar','USA'),
('James','Barry','UK'),
('James','Barry','UK'),
('James','Barry','UK');
alter table Test modify column ID int primary key auto_increment;
--To delete duplicate rows
Delete * from Test where id not IN
(select min(id) from Test
group by FirstName,LastName,Country
);
--output error Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' from Test where id not IN (select min(id) from Test group by Firs' at line 1*