Solved

How do I write a Delete query in SQL?

Posted on 2014-10-22
2
63 Views
Last Modified: 2014-10-22
In SQL, How do I convert the following select query so that it deletes the selected records?  

SELECT 
  DISTCUST.DISTRIBUTOR,
  DISTCUST.DISTCUSTOMER,
  DISTCUST.CUSTOMER,
  DISTCUST.ZIPCODE,
  DISTCUST.CUSTOMERIDT
FROM
  DISTCUST
WHERE
  DISTCUST.DISTRIBUTOR = '07030'

Open in new window


Thank you.
TH
0
Comment
Question by:thutchinson
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
Comment Utility
DELETE FROM
  DISTCUST
WHERE
  DISTCUST.DISTRIBUTOR = '07030'

Open in new window

0
 

Author Closing Comment

by:thutchinson
Comment Utility
That did it.  Thank You!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now