Is it possible to delete record from sql

Im new to most of this ,so please bare with me. I have a table

with email addresses. And I would like to delete a record if it

is no longer in use. How would I write this would it be something like this "DELETE [Email Address] FROM [Email Addresses] WHERE

[Email Address] LIKE '" + emailString + "'";

Thank u for your time

[363 byte] By [naslund26] at [2007-9-26 7:00:56]
# 1

Hi John, yes you're on the right track. The general syntax is:

DELETE FROM TABLE WHERE column=value {AND column=value}

Using the LIKE keyword can be problematic, as it can delete more than one row. If you have a primary key column or a set of columns that make up a unique index then use these columns:

delete from table where pk = 1

delete from tabke where uniquecol1=value and uniquecolumn2= value...

email addresses are sometimes considered unique so you could use thie instead:

delete from email_address where email_address="me@somwhere.com"

davejenk at 2007-7-1 16:36:31 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...