Respuesta :
Based on the code shown, the query that lists the number and name of all customers that are either represented by sales rep 30 or that currently have orders on file, or both is (Option B)
What is a query?
A query is a set of instruction using programming language (commonly SQL) to request information from a database.
In this case, the correct Query is:
"SELECT CustomerNum,
CustomerName, FROM Customer WHERE RepNum='30' UNION SELECT Customer.CustomerNum, CustomerName, FROM Customer, Orders WHERE Customer.CustomerNum=Orders.CustomerNum ;
What does the SELECT Statement do in SQL?
To choose data from a database, use the SELECT statement. The information received is kept in a result table known as the result-set.
"Learn more about Queries at;
https://brainly.com/question/25694408
#SPJ1
Full Question:
Based on the code shown, which query lists the number and name of all customers that are either represented by sales rep 30 or that currently have orders on file, or both?
Customer ( CustomerNum, CustomerName, Street, City, State, PostalCode, Balance, CreditLimit, RepNum )
A. SELECT CustomerNum, CustomerName, FROM Customer WHERE RepNum='30' UNION SELECT Customer.CustomerNum, CustomerName, FROM Customer ;
B. SELECT CustomerNum, CustomerName, FROM Customer WHERE RepNum='30' UNION SELECT Customer.CustomerNum, CustomerName, FROM Customer, Orders WHERE Customer.CustomerNum=Orders.CustomerNum ;
C. SELECT CustomerNum, CustomerName, FROM Customer WHERE RepNum='30' WHERE Customer.CustomerNum=Orders.CustomerNum ;
D. SELECT CustomerNum, CustomerName, FROM Customer WHERE RepNum='30' UNION SELECT Customer.CustomerNum, CustomerName, FROM Customer, Orders ;