Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My initials are knh and this neees to be done in sql 3:11 PM moodle.latech.edu AT&T Hint you have two ways to define foreign key,

My initials are knh and this neees to be done in sql image text in transcribed
image text in transcribed
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 Table Name: DEPT LOCATION XXX New York Salt Lake afford 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 Table Name: DEPT LOCATION XXX New York Salt Lake afford

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions