HOTSPOT -
Note: This question is part of a series of questions that use the same scenario. For your convenience, the scenario is repeated in each question. Each question presents a different goal and answer choices, but the text of the scenario is exactly the same in each question in this series.
You have a database named Sales that contains the following database tables: Customer, Order, and Products. The Products table and the Order table are shown in the following diagram.
The customer table includes a column that stores the data for the last order that the customer placed.
You plan to create a table named Leads. The Leads table is expected to contain approximately 20,000 records. Storage requirements for the Leads table must be minimized.
You need to implement a stored procedure that deletes a discontinued product from the Products table. You identify the following requirements:
✑ If an open order includes a discontinued product, the records for the product must not be deleted.
✑ The stored procedure must return a custom error message if a product record cannot be deleted. The message must identify the OrderID for the open order.
What should you do? To answer, select the appropriate Transact-SQL segments in the answer area.
Hot Area:
alisher
Highly Voted 5 years, 5 months agoJohnFan
5 years, 3 months agoNelly100
5 years, 2 months agoTheDUdeu
Most Recent 4 years, 6 months agoSoupDJ
4 years, 7 months agokiri2020
4 years, 7 months agoPennywiser
4 years, 10 months agostm22
4 years, 11 months agoJay2
5 years agoJohnFan
5 years, 3 months agopaee45
5 years, 4 months agoJohnFan
5 years, 3 months ago