Home > database >  Select distinct why don't delete the duplicate values
Select distinct why don't delete the duplicate values

Time:09-16

"I have 382 data from zhaopin,
Why do I write the following in Navicat, can get 379 data:
Select * from ABC.
Start the transaction;
The create table abc_new select distinct * from ABC.
The delete from ABC.
Insert into the select * from ABC abc_new;
Drop table abc_new;
commit;


And write or get 382 data:
Select * from ABC.
Start the transaction;
Select distinct * from ABC.
commit;

Article or write also received 382 data:
Select * from ABC.
Start the transaction;
The create table abc_new select distinct * from ABC.
commit;

Where do I select distinct usage is wrong? thank you

CodePudding user response:

You as long as there is a distinct * is not the same as the field data will not go, you'd better themselves with the column name, or you have automatic increase ID also inside, must think you are a different data

CodePudding user response:

See used to delete the data in the database, the method of window function
  • Related