The Union primary key sets two or more fields in the table as the primary key. Then, the value combination of these fields is used as the primary key value. The value of this primary key is unique in the data table and the primary key index is added.
This is understandable.
For example, there are many fields in your order table. Generally, you only need to have an order number bill_no as the primary key. However, it is required that the order number be supplemented and the same order number be used, in this case, you cannot use the order number separately because there are duplicates. Then you can use the order serial number bill_seq as the difference. Set bill_no and bill_seq to the Union primary key. Even if bill_no is the same, different bill_seq is also possible.
In some cases, you can dynamically combine bill_no and bill_seq to obtain the ID, which facilitates the query operation.