Solved

How do I write a Delete query in SQL?

Posted on 2014-10-22
2
68 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
ID: 40397237
DELETE FROM
  DISTCUST
WHERE
  DISTCUST.DISTRIBUTOR = '07030'

Open in new window

0
 

Author Closing Comment

by:thutchinson
ID: 40397667
That did it.  Thank You!
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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