i not understand what you want~
can u explain in more detail?
if you set orderid for OrderDetails table to FK, then when you tried to insert a row into the OrderDetails table that had a orderid of 10, InnoDB would check if a orderid of 10 existed in the Orders table and return an error if such a parent row did not exist. Conversely, you would not be allowed to delete a row from the Orders table if there were rows in the OrderDetails table that referred to the row in question.