Merging two MySql tables

Torbjorn Zetterlund ThunderBear

How to merge two MySql tables that have the same structure and were the primary keys of the two tables will clash. One option is: INSERT IGNORE INTO table_1 SELECT * FROM table_2;   which… continue reading »

Useful mysql to remove / in a db column

Torbjorn Zetterlund ThunderBear

Here is a handy sql statement for removing a trailing ‘/’ in the column url [callout_box] UPDATE websites SET url = LEFT(url, LENGTH(url) – 1) WHERE RIGHT(url, 1) = ‘/’ [/callout_box]