I need to write a trigger that rounds a value wh开发者_Python百科enever it is inserted/updated into a table
Here is a getting started tutorial on how to use Triggers in SQL Server. Start working on it and let us know if you have any issues.
DECLARE @tt TABLE (id INT NOT NULL PRIMARY KEY, value NUMERIC(10, 0) NOT NULL)
INSERT
INTO @tt
VALUES (1, 3.1415926)
SELECT *
FROM @tt
, without any triggers.
精彩评论