Laurent Hinoul

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - John F. Woods

Category: Database

How to delete duplicate rows in SQL

To find and delete duplicate rows from a table, you can execute the query below. Note that this is for Oracle. You can use it for other databases but you need to change the ‘rowid’ then.

You need to change the ‘table_name’ by your table name an the ‘column_name’ by your column you want to check on. To explain…

How to find a column name in all tables in MySQL

Sometimes, it could be handy to know in which tables a certain column name is specified. To do so, use the query below.

Note: you need to fill in your own column names and table_schema. Enjoy!

How to optimize MySQL

On, you find two interesting tools for MySQL. A configuration wizard that recommends a MySQL configuration based on your server settings. There is also a query analyzer tool that analyzes your SQL query and provides feedback. To use the tools, you need to log in, but they are free! MySQL settings optimizer The MySQL optimizer will ask you to…