Consider the following tables and assume they have been crea

Consider the following tables and assume they have been created:

Use SQL to manipulate the data and extract the following information (provide SQL query):

Delete the salesperson who sells product Number 16386.

Solution

DELETE FROM SALESPERSON WHERE SPNum = (SELECT SPNum from SALES table where ProdNum = 16386);

It selects the column SPNum from table named SALES from the row where column value ProdNum is 16386

Here we will get 186. So, above query is now as mentioned below

From table named SALESPERSON, it deletes row(s) for which value of the SPNum column is 186 and that\'s what we need.

Consider the following tables and assume they have been created: Use SQL to manipulate the data and extract the following information (provide SQL query): Delet

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site