Solved

How do I write a Delete query in SQL?

Posted on 2014-10-22
2
67 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

Suggested Solutions

Title # Comments Views Activity
How to base a filter depending on fields contents? 15 57
Extract string portion 2 24
SQL View Syntax case etc 5 34
sql server concatenate fields 10 35
I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
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…

770 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