I have written a lot about comparing and synchronizing tables. My examples always had both primary keys and non-key columns, so I could do updates along with inserts and deletes. What about the other tables? Here's a technique that works for them.
I’m always amazed at the questions that pop up for me. For example, how do you convert an Oracle script that creates my Video Store model to a Microsoft SQL Server script. It’s not very hard but there’s one big caveat, and that’s the fact that system_user is a reserved word. That means you can’t create the Access Control List (ACL) table with a system_user name. The alternative, would be to convert the system_user table name to database_user. That’s what I’ve done in this example.
How to generate SQL to compare and sync tables, when the target table has a UNIQUE constraint instead of a primary key. Warning: doesn't work if some rows have NULL values in all the columns used by the constraint.
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 […]
IEEE Spectrum published a ranking of the most popular programming languages. Computational journalist Nick Diakopoulos wrote the article. While it may surprise some, I wasn’t surprised to find SQL in the top ten.