I have 2 id columns: one is the table/system id, which has no meaning and should always be auto incremented. The second one is a business ID, which NOT ALWAYS will be set a value on insert, and may be set an incrementing number anytime after Insert.
So I was planning on using the NO_AUTO_VALUE_ON_ZERO setting, but from what I’ve read InnoDB doesn’t support 2 auto_increment columns. Any workaround I can use here?
You can’t have 2 auto-increment in one table or 2 TIMESTAMP column with CURRENT_TIMESTAMP,
your options:
How to create a trigger: http://dev.mysql.com/doc/refman/5.1/de/create-trigger.html