delete a few record on a a few tables

dec21st

Active member
Joined
May 14, 2005
Messages
43
Programming Experience
3-5
is this possible? i want to delete a few record from a few tables
i tried using these 2 statement but it can't seem to work on mssql2000

code 1
VB.NET:
@item = 10 //this is the eg param sent in
 
delete supplier, inventItem, quantity 
from supplier, inventItem, quantity 
where inventitem.supplier = @item 
and supplier.id = @item 
and quantity.id = (select supplier.id 
from inventItem 
where inventitem.supplier = @item)

code 2
VB.NET:
@item = 10 //this is the eg param sent in
 
delete supplier, inventItem, quantity 
from supplier 
inner join inventitem 
on supplier.id = inventitem.supplier 
inner join quantity 
on inventitem.id = quantity.id 
where supplier.id = @item
 
Back
Top