Set PK as a combined string of table 1 and 2 records Say, for example, I have 2 tables - Table 1 is Drink Type and Table 2 is Flavor. What is the query to create the unique identifier column which would result to drink_type_drink_flavor? 

+-------------+-------------------+
| drink_type  | drink_flavor      |
+-------------+-------------------+
| Fruity      | Apple             |
| Coffee      | Caramel           |


Expected PK for above would be Fruity_Apple and Coffee_Caramel
I think you just need a proper UNIQUE or PRIMARY KEY constraint:

ALTER TABLE drink 
    ADD CONSTRAINT drink_pk
        PRIMARY KEY 
        (drink_type, drink_flavor);`


If you often want the concatenation of the 2 columns in query results, you can use a view or a generated column (depending on MySQL version).