Question: Based on this SQL code select the right option: CREATE TABLE DEPT LOCATIONS ( Dnumber INT NOT NULL, Dlocation VARCHAR (15) NULL, PRIMARY KEY (Dnumber,Dlocation),

 Based on this SQL code select the right option: CREATE TABLE

Based on this SQL code select the right option: CREATE TABLE DEPT LOCATIONS ( Dnumber INT NOT NULL, Dlocation VARCHAR (15) NULL, PRIMARY KEY (Dnumber,Dlocation), FOREIGN KEY (Dnumber) REFERENCES DEPARTMENT (Dnumber) ON DELETE CASCADE ON UPDATE CASCADE); This query is incorrect. Dlocation must be defined as NOT NULL because is part of the primary key This query is incorrect. DNumber can't reference another attribute with the same name This query is incorrect. A varchar column can't be part of the primary key This query is incorrect. The Primary Key can't have two elements

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 Databases Questions!