Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 MS SQL 2008 数据库的表中有一个包含 3 列的表
ID ToolID Count
有人可以向我扔一个脚本,该脚本将创建一个接受参数 ToolID 并将其值增加 1 的存储过程吗?
我所有的努力都失败了。
尝试:
CREATE PROCEDURE IncrementToolCount ( @ToolID int ) AS SET NOCOUNT ON UPDATE Tools_Usage SET [Count]=ISNULL([Count],0)+1 WHERE ToolID=@ToolID GO