Two autoincrements columns or autoincrement and same value in other column
问题 I need two columns in table that would have same value on insert. Is there any way to do it from database side? 回答1: So you want to let one column use the auto_increment feature, but make another column in the same table also have the same value? I can't think of a reason you would need this feature. Perhaps you could explain what you're trying to accomplish, and I can suggest a different solution? A trigger won't work for this. It's a chicken-and-egg problem: You can't change any column's