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

Based on the tables below, which of the following SQL commands would return the

ID: 3908887 • Letter: B

Question

Based on the tables below, which of the following SQL commands would return the average customer balance grouped by SalesRepNo?

GENERAL SALES DATABASE:

SALESREP

SalesRepNo

RepName

HireDate

654

Jones

01/02/2005

734

Smith

02/03/2007

345

Chen

01/25/2004

434

Johnson

11/23/2004

CUSTOMER

CustNo

CustName

Balance

SalesRepNo

9870

Winston

500

345

8590

Gonzales

350

434

7840

Harris

800

654

4870

Miles

100

345

SalesRepNo

RepName

HireDate

654

Jones

01/02/2005

734

Smith

02/03/2007

345

Chen

01/25/2004

434

Johnson

11/23/2004

Which of the following keywords must have been included during the creation of a FOREIGN KEY constraint to allow a row from the parent table to be updated, even if it is referenced by a row in the child table? OCASCADE AUTO REMOVE O ON DELETE SET NULL O ON UPDATE CASCADE ON DELETE CASCADE

Explanation / Answer

ON UPDATE CASCADE : ON UPDATE CASCADE would allow you to change the primary key value and any tables that have foreign key references to the value will be changed accordingly.