Question: Needs to be done in sql using cmd 3:11 PM moodle.latech.edu AT&T Hint you have two ways to define foreign key, one is to define
Needs to be done in sql using cmd 3:11 PM moodle.latech.edu AT&T Hint you have two ways to define foreign key, one is to define foreign key within the CREATE TABLE statement, for example: CREATE TABLE products (product id numeric(10) not nul, supplier id numeric(10) CONSTRAINT fk supplier FOREIGN KEY (supplier id) REFERENCES supplier(supplier_id) ON DELETE SET NULL) Another way is to create table without defining foreign key and add foreign key later using the ALTERTABLE statement (sometimes you might have to do like this), for example: ALTER TABLE Products ADD CONSTRAINT fk supplier FOREIGN KEY (supplier id) REFERENCES supplier(supplier id) ON DELETE SET NULL Insert Data Table Name: EMPLOYEE XXx SaperSSN Table Name: DEPARTMENT XxX DName Mamafacture escarch 133445555 22-MAY-78 Table Name: DEPT LOCATION XXX New York Salt Lake afford
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
