Question: INVENTORY SALES SALES Table create statement: Create Table SALES ( ID int, Amt decimal ( 1 2 , 2 ) , INV _ ID int,
INVENTORY
SALES
SALES Table create statement:
Create Table SALES
ID int,
Amt decimal
INVID int,
Primary key ID
Foreign Key INVID references INVENTORY ID
ON DELETE RESTRICT
ON UPDATE CASCADE;
DELETE FROM INVENTORY WHERE ID
Choose
Data will updatedelete in only in the table referenced in the SQL statement
Data will updatedelete in both tables
;
Referential integrity ERROR
UPDATE INVENTORY SET QTY
WHERE ID ;
DELETE FROM SALES WHERE ID ;
UPDATE INVENTORY SET ID
WHERE ID ;
DELETE FROM INVENTORY WHERE ID
;
INVENTORY
SALES
SALES Table create statement:
Create Table SALES
ID int,
Amt decimal
INVID int,
Primary key ID
Foreign Key INVID references INVENTORY ID
ON DELETE RESTRICT
ON UPDATE CASCADE;
DELETE FROM INVENTORY WHERE ID
Choose
Data will updatedelete in only in the table referenced in the SQL statement
Data will updatedelete in both tables
;
Referential integrity ERROR
UPDATE INVENTORY SET QTY
WHERE ID ;
DELETE FROM SALES WHERE ID ;
UPDATE INVENTORY SET ID
WHERE ID ;
DELETE FROM INVENTORY WHERE ID
;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
