Combine two integers to create a unique number

后端 未结 7 2073
北荒
北荒 2020-12-10 02:05

Good Morning,

I was looking for a way to combine two integers to create a unique number, I have two tables that I need to combine into a third table with unique numb

7条回答
  •  庸人自扰
    2020-12-10 02:31

    This SO thread has detailed various other mathematical approaches, some are just better. But for your case I suspect if those are hardly good ideas. I would say you should save the two ids in a 3rd table which has its own unique id (primary key) column.

提交回复
热议问题