KnowledgeBoat Logo

Computer Science

Given the following tables :

Orders (OrdNo, Ord_date, ProdNo#, Qty) 
Product (ProdNo, Descp, Price)
Payment (OrdNo, Pment)

Write a query to delete all those records from table Orders whose complete payment has been made.

DDL & DML

8 Likes

Answer

DELETE FROM Orders
WHERE OrdNo IN (
    SELECT Payment.OrdNo
    FROM Payment
    WHERE Payment.Pment = 'COMPLETE');

Answered By

5 Likes


Related Questions