sql delete - How to remove duplicate rows from a mysql table -
i have table large number of columns. say, table has 1000 columns 'col1' 'col1000'.
for duplicate criteria don't want use 'col1' , 'col1000'. so, if in row values 'col2' 'col999' have occurred, duplicates.
i tried solution given here http://www.besttechtools.com/articles/article/sql-query-to-delete-duplicate-rows requires me explicitly write columns considering duplicates. can't write 998 columns.
can please me query in deleting such duplicates?
i want delete such duplicates in multiple tables.
one thing sure - have name columns query. 1 simple approach use excel task easily.
1) describe table, column names. 2) put column names excel , cleanup data (using text-to-column feature along find/replace).
3) once have columns, build query. can use excel sort of specific manipulation around column in one-go (using select-drag).
4) once queries ready, dump text file select excel data (of cells).
5) make sure replace tab (\t) characters space text file.
you should go , execute.
Comments
Post a Comment