I have a table named payment_request
in MySQL
DESCRIBE payment_request
provides the following output,
The orderbook
table is provided below,
I want to add the id
in the payment_request
table in orderbook
as the id
column (second position) with the name after Foreign key to payment_request_id
.
What is the SQL used to run MySQL?
You can do this when creating the table:
Or by changing the form:
Also see this tutorial.
First, you need to add a new column to the table
orderbook
Then add a constraint that defines the foreign key
refer to: