Use the MERGE statement to do "upserts". If you want to synchronize tables without doing DELETEs, MERGE will do the job without a prior "compare" step.
Happy New Year to all those kind enough to read my blog! 2014 was the year I started blogging and presenting at Oracle-related conferences. It has been a great experience. I enjoy studying specific problems in depth and being able to correct or improve my efforts without constraints. Thanks very much to all those who […]
Another batch of SQL brainteasers. This time the clues are to the powers of mythical creatures – the task is to guess the creature!
There’s six in all, can you get them all? Put your answers in the comments!
Somebody ran into the following error message trying to query the
innodb_sys_foreign_cols tables from the
Somebody wanted to know how to find any non-unique indexes in MySQL. The query takes a session variable with the table name and returns the non-unique indexes by column names. It uses a correlated subquery to exclude the table constraints.
You set the session variable like this: