mysql: remove duplicates that also contains a break space -


by mistake did insert in mysql rows contains duplicates, these duplicates not recognized because contain brak space

    eg.       | id | name    |        --------------       |  1 | apple   |       |  2 | apple{b}| //the {b} show cell contains break space 

so when try remove duplicates not recognized duplicates... , when try remove breaks error because name unique cell

what's best practice fix issue?

you can use regular expressions find or delete records containing space in end:

delete your_table name regexp '\s+$'; 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -