Enforce unique values across two tables

后端 未结 7 1283
慢半拍i
慢半拍i 2021-01-01 20:48

Is it possible to enforce uniqueness across two tables in MySQL?

I have two tables, both describing users. The users in these tables were for two different systems p

7条回答
  •  情书的邮戳
    2021-01-01 21:05

    Maybe not direct answer to your question, but:

    You should consider rewriting your code and restructuring your database to unite those two tables into one.

    The design you are trying to enforce now will complicate your code and database schema and it will make any further upgrade to other database software or frameworks harder.

提交回复
热议问题