I have a table with 3 column's in a table on a MS SQL 2008 Database
ID
ToolID
Count
Can someone toss me a script that will create a stored procedure that accepts the param ToolID and increases its value by 1?
All of my efforts have failed.
I have a table with 3 column's in a table on a MS SQL 2008 Database
ID
ToolID
Count
Can someone toss me a script that will create a stored procedure that accepts the param ToolID and increases its value by 1?
All of my efforts have failed.
try:
CREATE PROCEDURE IncrementToolCount
(
@ToolID int
)
AS
SET NOCOUNT ON
UPDATE Tools_Usage SET [Count]=ISNULL([Count],0)+1 WHERE ToolID=@ToolID
GO