Interview Preparation mode beta
Funny Facebook Status Funny Facebook Status
Enter your email address

How To Delete an Existing Row from a Table?

Nice?Vote!

1 Answer

Nice?Vote!
If you want to delete an existing row from a table, you can use the DELETE statement with a WHERE clause to identify that row. Here is good sample of DELETE statements:

INSERT INTO temp_links (url, id)
  VALUES ('newsite.com', 301);
1 row created.

SELECT * FROM temp_links WHERE id = 301;
   ID URL                      NOTES     COUNTS CREATED
----- ------------------------ -------- ------- ---------
  301 newsite.com    NULL     NULL   07-MAY-06  

DELETE FROM temp_links WHERE id = 301;
1 row deleted.

SELECT * FROM temp_links WHERE id = 301;
no rows selected
answered 1 year ago by siva (10,720 points) edited 1 year ago by R

Related questions