Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

A-level Computing 2009/AQA/Problem Solving, Programming, Operating Systems, Databases and Networking/Databases/DELETE

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

INSERT Data definition language Sometimes you might fall out with friends on Facebook so that you don't even want them to see your restricted page. You'd want to delete your relationship (it's actually likely that Facebook retains the connection but flags it as 'deleted', that isn't important here). The police might also find that a crook is in fact innocent and then want to delete their criminal record. We need a DELETE command to do all of these things, to permanently delete records from databases. Imagine that we find out that Geoff was framed and he is completely innocent: DELETE FROM crooks WHERE name = 'Geoff' 1 Exercise: DELETE statements The police have agreed an amnesty with all heavily scarred (4+) women and have decided to delete them from the database. Write a statement to do this. DELETE FROM crooks WHERE numScars >= 4 AND gender = 'female' The police want to delete all minors (people under 16) from their records. Do it! DELETE FROM crooks WHERE DoB >= 2002