all groups > sql server (alternate) > october 2003 >
You're in the

sql server (alternate)

group:

Deleting from a list.


Deleting from a list. stevesusenet NO[at]SPAM yahoo.com
10/31/2003 5:13:53 PM
sql server (alternate):
Hi;

I am still improving my sql/tsql skills.

I was wondering if someone could give me some advice on how to do some
high powered deletes.

I have two tables, A and B.

"A" is the table I want to delete records from.

"B" is a table where each record is 4 keys ( fields ) that I want to
match with one or more records in "A" to remove.

Could I accomplish this with something like


delete from A ( select .... from B ) ?

Re: Deleting from a list. John Bell
11/1/2003 9:31:58 AM
Hi

Books online should be the first option when wanting to find out information
regarding syntax etc. and example D on the delete definition page gives you
exactly what you want.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_9lut.asp?frame=true

John

[quoted text, click to view]

AddThis Social Bookmark Button