logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
European Travel
Action Movies
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel


dailyclick
All times in EST

Low Carb: 8:00 PM

Full Schedule
g
g ASP Site

BellaOnline's ASP Editor

g

DELETE - Deleting in SQL


One of the most dangerous commands you can issue is the DELETE command. Be very cautious that you use this command properly, lest you find your entire table wiped out.

The syntax is very simply

DELETE from WRITERS where WRITER_ID = 10

Anything that matches that where clause is gone, POOF, never to be seen again. You don't get an "are you sure" or "would you like to undo?" query. SQL is a powerful language, and it is assumed you know what you're doing.

I highly, highly recommend you always test, test, and then test again before you issue any delete commands. Make sure you build safeguards into your system so that people cannot get to a delete command page unless they have full authorization to do so. Just imagine if the command instead read

DELETE from WRITERS

that command would wipe out every single writer in your database, with that one line. If you forget to add on the WHERE clause properly, you could be doomed.

Which of course brings us to the Always Back Up your Data instruction. Have frequent backups. Do not overwrite your backups with new backups. Sometimes a week or more can go by before you realize that something disastrous was done to your data. It's important to have the ability to go back to a correct save set.
Add DELETE+%2D+Deleting+in+SQL to Twitter Add DELETE+%2D+Deleting+in+SQL to Facebook Add DELETE+%2D+Deleting+in+SQL to MySpace Add DELETE+%2D+Deleting+in+SQL to Del.icio.us Digg DELETE+%2D+Deleting+in+SQL Add DELETE+%2D+Deleting+in+SQL to Yahoo My Web Add DELETE+%2D+Deleting+in+SQL to Google Bookmarks Add DELETE+%2D+Deleting+in+SQL to Stumbleupon Add DELETE+%2D+Deleting+in+SQL to Reddit




RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2014 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.

g


g features
Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor