rowID is the data stored in the database, automatically the encoding for that data, each data has a different encoding, we can quickly determine a column based on rowID , and then manipulate it.
This is the database to check the weight, and delete all duplicate data, only one, here I am based on the ID of this column to check the weight, multi-column check the method is similar.
Delete from TB where (ID) in
(select Name from TB GROUP by Name has count (ID) >1)
and rowID not in (the Select min (rowid) from the TB group by Name has count (id) >1);
Commit
Data from different regions are queried, and the same area data is placed together, from top to bottom, and sequentially on a single table.
A Union all B joins two tables, all of which are table A, the bottom is all table B, and the data for the two tables are all displayed, whether or not they are duplicated.
A union B joins two tables, similar to union all, but if there are duplicate data in two tables, the duplicate data is deleted, only one is left, and the sort is scrambled, not all above is table A, and below is table B.
SELECT * from TB t where diqu= ' Chaoyang ' UNION ALL SELECT * from TB t where diqu= ' open ' union all
SELECT * from TB t where diqu= ' nan ' union ALL SELECT * from TB t where diqu= ' green garden '
UNION ALL SELECT * from TB t where diqu= ' er ' union ALL SELECT * from TB t where diqu= ' high '
UNION ALL SELECT * from TB t where diqu= ' auto City ' UNION ALL SELECT * from TB t where diqu= ' Dehui '
UNION ALL SELECT * from TB t where diqu= ' Kuancheng ' UNION ALL SELECT * from TB t where diqu= ' net month '
UNION ALL SELECT * from TB t WHERE diqu= ' Elm '
Database data Check Weight