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

Tag: sql

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!