Question: ` ` ` CREATE TABLE OrderDetails ( order _ detail _ id INT PRIMARY KEY AUTO _ INCREMENT, order _ id INT, book _ id

```
CREATE TABLE OrderDetails (
order_detail_id INT PRIMARY KEY AUTO_INCREMENT,
order_id INT,
book_id INT,
quantity INT,
price DECIMAL(10,2),
subtotal DECIMAL(10,2) AS (quantity * price) STORED,
FOREIGN KEY (order_id) REFERENCES Orders(order_id),
FOREIGN KEY (book_id) REFERENCES Books(book_id)
);
```
I tried inserting without null in insert then get a different error. how do I add multiple books in this table. thanks
` ` ` CREATE TABLE OrderDetails ( order _ detail

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!