This topic contains a solution. Click here to go to the answer

Author Question: Which of the following SQL statements is a correctly stated correlated subquery? A) SELECT ... (Read 43 times)

Jramos095

  • Hero Member
  • *****
  • Posts: 528
Which of the following SQL statements is a correctly stated correlated subquery?
 
  A) SELECT C1.CustName, C1.SalesRepNo
  FROM CUSTOMER C1
  WHERE C1.SalesRepNo IN
   (SELECT S1.SalesRepNo
   FROM SALESREP S1
   WHERE S1.RepName = 'Smith');
  B) SELECT C1.CustName, C1.SalesRepNo
  FROM CUSTOMER C1
  WHERE C1.SalesRepNo IN
   (SELECT S1.SaleRepNo
   FROM SALESREP S1
   WHERE S1.RepName = 'Smith')
   AND C1.SalesRepNo=S1.SalesRepNo);
  C) SELECT C1.CustName, C1.SalesRepNo
  FROM CUSTOMER C1
  WHERE C1.SalesRepNo IN
   (SELECT S1.SaleRepNo
   FROM SALESREP S1
   WHERE S1.RepName = 'Smith')
   AND C1.SalesRepNo<>S1.SalesRepNo);
  D) SELECT C1.CustName, C1.SalesRepNo
  FROM CUSTOMER C1
  WHERE C1.SalesRepNo IN
   (SELECT C2.SaleRepNo
   FROM CUSTOMER C2
   WHERE C1.SalesRepNo=C2.SalesRepNo);
   AND C1.OrderNo<>C2.OrderNo);

Question 2

SQL Server security roles provide a simple way to control user privileges in a database.
 
  Indicate whether the statement is true or false



Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by a Subject Expert

chloejackso

  • Sr. Member
  • ****
  • Posts: 316
Answer to Question 1

D

Answer to Question 2

TRUE




Jramos095

  • Member
  • Posts: 528
Reply 2 on: Jul 7, 2018
Excellent


bblaney

  • Member
  • Posts: 323
Reply 3 on: Yesterday
Thanks for the timely response, appreciate it

 

Did you know?

There are immediate benefits of chiropractic adjustments that are visible via magnetic resonance imaging (MRI). It shows that spinal manipulation therapy is effective in decreasing pain and increasing the gaps between the vertebrae, reducing pressure that leads to pain.

Did you know?

In 1885, the Lloyd Manufacturing Company of Albany, New York, promoted and sold "Cocaine Toothache Drops" at 15 cents per bottle! In 1914, the Harrison Narcotic Act brought the sale and distribution of this drug under federal control.

Did you know?

The immune system needs 9.5 hours of sleep in total darkness to recharge completely.

Did you know?

In Eastern Europe and Russia, interferon is administered intranasally in varied doses for the common cold and influenza. It is claimed that this treatment can lower the risk of infection by as much as 60–70%.

Did you know?

Although not all of the following muscle groups are commonly used, intramuscular injections may be given into the abdominals, biceps, calves, deltoids, gluteals, laterals, pectorals, quadriceps, trapezoids, and triceps.

For a complete list of videos, visit our video library