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 42 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
YES! Correct, THANKS for helping me on my review


Perkypinki

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

 

Did you know?

The use of salicylates dates back 2,500 years to Hippocrates's recommendation of willow bark (from which a salicylate is derived) as an aid to the pains of childbirth. However, overdosage of salicylates can harm body fluids, electrolytes, the CNS, the GI tract, the ears, the lungs, the blood, the liver, and the kidneys and cause coma or death.

Did you know?

The Food and Drug Administration has approved Risperdal, an adult antipsychotic drug, for the symptomatic treatment of irritability in children and adolescents with autism. The approval is the first for the use of a drug to treat behaviors associated with autism in children. These behaviors are included under the general heading of irritability and include aggression, deliberate self-injury, and temper tantrums.

Did you know?

The people with the highest levels of LDL are Mexican American males and non-Hispanic black females.

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?

The types of cancer that alpha interferons are used to treat include hairy cell leukemia, melanoma, follicular non-Hodgkin's lymphoma, and AIDS-related Kaposi's sarcoma.

For a complete list of videos, visit our video library