April 13, 2007 at 7:40 am
Hi,
i need help on this.
i have three tables
1.Table A
2.Table B
3.Table C
All the table have Project ID has a Primary Key
i want to write a delete statement in the stored procedure which passes Project ID as a parameter and when i execute,it will delete all the rows from all the three tables for that particular Project ID which is being passed.
April 13, 2007 at 7:47 am
CREATE PROCEDURE dbo.uspDeleteWithProjectID
(
@ProjectID INT
)
AS
DELETE TableA WHERE ProjectID = @ProjectID
DELETE TableB WHERE ProjectID = @ProjectID
DELETE TableC WHERE ProjectID = @ProjectID
N 56°04'39.16"
E 12°55'05.25"
April 13, 2007 at 7:53 am
Thanks a lot
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply