Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,can some one tell me how to write a stored procedure in sql to set deleted to 1 for the table name Account , where the column names are
account id(pk, char(10),not null),
account name varchar(20,not null),
is default (bit,not null),
deleted(bit,not null)
Posted

1 solution

Delete in a stored procedure[^] should help you out.
 
Share this answer
 
Comments
sindhuan 14-Mar-12 3:05am    
ALTER PROCEDURE [acc].[account]
@accountid char(10),
@accountName nvarchar(50)

AS

DELETE FROM accountName
WHERE
accountid = @accountid
AND
accountName = @accountName
GO

is this correct???

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900