Saturday, November 7, 2009

DELETE Querie


DELETE

Sometimes we may wish to get rid of records from a table. To do so, we can use the DELETE FROM command.
The syntax for this is
DELETE FROM "table_name"
WHERE {condition}

It is easiest to use an example. Say we currently have a table as below:

Table Shop





and we decide not to keep any information on Kumar in this table. To accomplish this, we type the following SQL:

DELETE FROM Shop
WHERE store_name = "Kumar"

Now the content of table would look like

Table Shop





No comments:

Post a Comment