Question: You have the following 2 tables with sample data: TABLE: customer custno custname custstreet custcity custprov custpcode disc balance creditlimit srepno C 0 1 Jones

You have the following 2 tables with sample data:
TABLE: customer
custno custname custstreet custcity custprov custpcode disc balance creditlimit srepno
C01 Jones 23 Bloor St.W. Toronto ON P8M0U00002
C02 John Smith 1 Bloor St. Brampton ON L6N5T4050010002
TABLE: salesrep
srepno srepname srepstreet srepcity srepprov sreppcode totcomm commrate
2 Josh To 2 Green St. Brampton ON L6L6H41000.2
3 Jim West 5 Main St. Brampton ON K8I9P01000.2
Which query will show all sales reps who do not have any customers? Select all that apply.
Question 6 options:
SELECT DISTINCT s.*
FROM salesrep s JOIN customer c
ON s.srepno=c.srepno;
SELECT s.*
FROM salesrep s LEFT JOIN customer c
ON s.srepno=c.srepno
WHERE c.srepno IS NULL;
SELECT *
FROM salesrep
WHERE srepno =(SELECT DISTINCT srepno FROM customer);
SELECT *
FROM salesrep
WHERE srepno NOT IN (SELECT DISTINCT srepno FROM customer);
SELECT s.*
FROM salesrep s LEFT JOIN customer c
ON s.srepno=c.srepno
WHERE s.srepno IS NULL;

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!