Custom PrimaryKey Generation with autoincrement

后端 未结 6 781
小蘑菇
小蘑菇 2021-01-22 21:08

I need to define and generate primary key for 2 or more tables.

Tables hold same type of data but FOR Some BUSINESS RULES we have to make them separate say like

6条回答
  •  佛祖请我去吃肉
    2021-01-22 21:08

    I think you should keep them in the same table if at all possible, and add another column to distinguish between local and international customers. With 2 tables, you double all the work you'll need to do in the future on these tables. Not to mention using a calculated varchar id value instead of a simple generated long id.

提交回复
热议问题