Monday, March 12, 2012

Delete duplicate values in a column using MySQL

You could have faced a situation where you have huge number of records and have to remove the duplicate entries (like duplicate email id) from it, if you have worked with data import. Of course you could do it programmatically, but you could do it faster using the Database itself.

Rename Database in MySQL

MySQL had supported renaming Database in some earlier versions, but due to some security issues it was removed. So, if you create a Database, you do not have a command to directly rename it. There is a workaround though so that you need not create and populate all the tables to the new database.