Question: Task # 2 : Inserting Rows Staff staffNo sName position salary branchNo bAddress SL 2 1 John White Manager 3 0 0 0 0 B

Task #2: Inserting Rows
Staff
staffNo sName position salary branchNo bAddress
SL21 John White Manager 30000 B00522 Deer Rd., London
SG37 Ann Beech Assistant 12000 B003163 Main St., Glasgow
SG14 David Ford Supervisor 18000 B003163 Main St., Glasgow
SA9 Mary Howe Assistant 9000 B00716 Argyll St., Aberdeen
SG5 Susan Brand Manager 24000 B003163 Main St., Glasgow
SL41 Julie Lee Assistant 9000 B00522 Deer Rd., London
Which of the following SQL Insert statement adds one employee to the table above? Additionally, explain the rationale on each of the choices on why the SQL statement works or does not work.
INSERT INTO Staff VALUES (SA4,Alan,Brown,Assistant,8300,B007,16 Argyll St., Aberdeen);
INSERT INTO Staff (staffNo, sName, branchNo) VALUES (SA4,Alan Brown,B007);
INSERT INTO Staff VALUES (SA4,Alan Brown,Assistant, NULL, B007,16 Argyl Rd., Aberdeen);
Task #3
Inserting Rows
Staff
staffNo sName position salary branchNo bAddress
SL21 John White Manager 30000 B00522 Deer Rd., London
SG37 Ann Beech Assistant 12000 B003163 Main St., Glasgow
SG14 David Ford Supervisor 18000 B003163 Main St., Glasgow
SA9 Mary Howe Assistant 9000 B00716 Argyll St., Aberdeen
SG5 Susan Brand Manager 24000 B003163 Main St., Glasgow
SL41 Julie Lee Assistant 9000 B00522 Deer Rd., London
Which of the following SQL Insert statement adds one employee to the table above?
INSERT INTO Staff VALUES (SA4,Alan,Brown,Assistant,8300,B007,16 Argyll St., Aberdeen);
INSERT INTO Staff (staffNo, sName, branchNo) VALUES (SA4,Alan Brown,B007);
INSERT INTO Staff VALUES (SA4,Alan Brown,Assistant, NULL, B007,16 Argyl Rd., Aberdeen);
Task #4
Inserting Rows
Staff
staffNo sName position salary branchNo bAddress
SL21 John White Manager 30000 B00522 Deer Rd., London
SG37 Ann Beech Assistant 12000 B003163 Main St., Glasgow
SG14 David Ford Supervisor 18000 B003163 Main St., Glasgow
SA9 Mary Howe Assistant 9000 B00716 Argyll St., Aberdeen
SG5 Susan Brand Manager 24000 B003163 Main St., Glasgow
SL41 Julie Lee Assistant 9000 B00522 Deer Rd., London
Based on a close reading of the choices for Task #3, name one anomaly (mistake) that could rise when inserting records?
Task #5: Updating Rows
Staff
staffNo sName position salary branchNo bAddress
SL21 John White Manager 30000 B00522 Deer Rd., London
SG37 Ann Beech Assistant 12000 B003163 Main St., Glasgow
SG14 David Ford Supervisor 18000 B003163 Main St., Glasgow
SA9 Mary Howe Assistant 9000 B00716 Argyll St., Aberdeen
SG5 Susan Brand Manager 24000 B003163 Main St., Glasgow
SL41 Julie Lee Assistant 9000 B00522 Deer Rd., London
Which of the following SQL statement properly adjusts an in the table above?
UPDATE Staff SET bAddress =195 Post Rd., Glasgow WHERE staffNo =SG37;
UPDATE Staff SET bAddress =195 Post Rd., Glasgow;
UPDATE Staff SET bAddress =195 Post Rd., Glasgow WHERE branchNo =B003;
Task #6
Updating Rows
Staff
staffNo sName position salary branchNo bAddress
SL21 John White Manager 30000 B00522 Deer Rd., London
SG37 Ann Beech Assistant 12000 B003163 Main St., Glasgow
SG14 David Ford Supervisor 18000 B003163 Main St., Glasgow
SA9 Mary Howe Assistant 9000 B00716 Argyll St., Aberdeen
SG5 Susan Brand Manager 24000 B003163 Main St., Glasgow
SL41 Julie Lee Assistant 9000 B00522 Deer Rd., London
Based on a close reading of the choices in Task #5, name one anomaly (mistake) that could rise when updating records?
Task #7
Deleting Rows
Staff
staffNo sName position salary branchNo bAddress
SL21 John White Manager 30000 B00522 Deer Rd., London
SG37 Ann Beech Assistant 12000 B003163 Main St., Glasgow
SG14 David Ford Supervisor 18000 B003163 Main St., Glasgow
SA9 Mary Howe Assistant 9000 B00716 Argyll St., Aberdeen
SG5 Susan Brand Manager 24000 B003163 Main St., Glasgow
SL41 Julie Lee Assistant 9000 B00522 Deer Rd., London
Which of the following SQL statement properly deletes a staff record. Additionally explain the rationale for each of the choices (correct and wrong ones)?
DELETE FROM Staff WHERE staffNo =SA9;
DELETE FROM Staff;
DELETE FROM Staff WHERE position =Assistant;
Task # 2 : Inserting Rows Staff staffNo sName

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