Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Modify the following SQL command so that the Rep_ID column is the PRIMARY KEY fo

ID: 3901880 • Letter: M

Question

Modify the following SQL command so that the Rep_ID column is the PRIMARY KEY for the table and the default value of Y is assigned to the Comm column. ( The Comm column indicates whether the sales representative earns a commission.)

Change the STORE_REPS table so that NULL values can’t be entered in the name columns (First and Last),

Change the STORE_REPS table so that NULL values can’t be entered in the name columns Comm columns).

Add a column named Base_salary a with datatype of a NUMBER(1,2) to the STORE_REPS table. Ensure that the amount entered is above zero.

Explanation / Answer

If you have any doubts, please give me comment...

ALTER TABLE STORE_REPS MODIFY Rep_ID INTEGER NOT NULL PRIMARY KEY, MODIFY Comm CHAR(1) DEFAULT 'Y';

ALTER TABLE STORE_REPS CHANGE FirstName FirstName VARCHAR(100) NOT NULL, CHANGE LastName LastName VARCHAR(100) NOT NULL;

ALTER TABLE STORE_REPS CHANGE Comm Comm CHAR(1) NOT NULL;

ALTER TABLE STORE_REPS ADD Base_salary NUMBER(1,2) CHECK Base_salary>0;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote