Process repeated records (query and delete) in a table. 1. Repeat records with the same Name are retained. Only one record with the same Name is retained, keep one of the records large or small. 1. Used to query repeat processing records (if the column has no size relationship, SQL2000 uses the auto-incrementing column and temporary table for processing, and SQL2005 uses the row_number function for processing ).
Process repeated records (query and delete) in a table. 1. Repeat records with the same Name are retained. Only one record with the same Name is retained, keep one of the records large or small. 1. Used to query repeat processing records (if the column has no size relationship, SQL2000 uses the auto-incrementing column and temporary table for processing, and SQL2005 uses the row_number function for processing ).
Process repeated table records (query and delete)
Query
1. record with the same Name duplicate value. Only one record is retained if there is no size relationship.
2. if the Name is the same and the ID has a size relationship, keep one of the records large or small.
I. Used to query repeat processing records (if the column does not have a size relationship, SQL2000 uses the auto-incrementing column and temporary table for processing, and SQL2005 uses the row_number function for processing)
Generate Test Data
() # T 5 (, (1), (2) 9) 10 INSERT # T, N, n, N, Hong Kong Space, Hong Kong virtual host, Hong Kong Space