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 45 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
Wow, this really help


Bigfoot1984

  • Member
  • Posts: 321
Reply 3 on: Yesterday
:D TYSM

 

Did you know?

According to research, pregnant women tend to eat more if carrying a baby boy. Male fetuses may secrete a chemical that stimulates their mothers to step up her energy intake.

Did you know?

In 1864, the first barbiturate (barbituric acid) was synthesized.

Did you know?

The average older adult in the United States takes five prescription drugs per day. Half of these drugs contain a sedative. Alcohol should therefore be avoided by most senior citizens because of the dangerous interactions between alcohol and sedatives.

Did you know?

The effects of organophosphate poisoning are referred to by using the abbreviations “SLUD” or “SLUDGE,” It stands for: salivation, lacrimation, urination, defecation, GI upset, and emesis.

Did you know?

Cocaine was isolated in 1860 and first used as a local anesthetic in 1884. Its first clinical use was by Sigmund Freud to wean a patient from morphine addiction. The fictional character Sherlock Holmes was supposed to be addicted to cocaine by injection.

For a complete list of videos, visit our video library