Custom PrimaryKey Generation with autoincrement

后端 未结 6 776
小蘑菇
小蘑菇 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:26

    If your proposed 2 tables have the same columns, then I see no reason why you should make them separate tables at all. Create a column for storing the type of customer (international or domestic) and keep track that way. Why use 2 tables when 1 will suffice?

提交回复
热议问题