Use MySQL Create the following table called ORDER_LINE based on the following de
ID: 3769057 • Letter: U
Question
Use MySQL
Create the following table called ORDER_LINE based on the following details shown below.
Column Name
Data Type
Size
Constraint
ORDER_NUM
CHAR
5
PK (COMPOSITE)
PART_NUM
CHAR
4
PK (COMPOSITE)
NUM_ORDERED
DECIAML
3,0
QUOTED_PRICE
DECIMAL
3,0
2.
Insert the following data rows into the ORDER_LINE table.
ORDER_NUM
PART_NUM
NUM_ORDERED
QUOTED_PRICE
21608
AT94
11
21.95
21610
DR93
1
495.00
21610
DW11
1
399.99
21613
KL62
4
329.95
21614
KT03
2
595.00
21617
BV06
2
794.95
21617
CD52
4
150.00
21619
DR93
1
495.00
21623
KV29
2
1290.00
Please tell me ,thank you .
Column Name
Data Type
Size
Constraint
ORDER_NUM
CHAR
5
PK (COMPOSITE)
PART_NUM
CHAR
4
PK (COMPOSITE)
NUM_ORDERED
DECIAML
3,0
QUOTED_PRICE
DECIMAL
3,0
Explanation / Answer
create table order_line(order_num char(5), part_num char(5), num_ordered decimal(3,0), quoted_price decimal(3,0) CONSTRAINT pk_ID PRIMARY KEY (order_num, part_num));
insert into order_line values('21608', 'AT94',11, 21.95),
('21610','DR93',1, 495.00),
('21610','DW11',1,399.99),
('21613','KL62',4,329.95),
('21614','KT03',2,595.00),
('21617','BV06',2,794.95),
('21617','CD52',4,150.00),
('21619','DR93',1,495.00),
('21623','KV29',2,1290.00);
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.