Home Forums SQL Server 7,2000 T-SQL Can I modify a column value in a trigger? RE: Can I modify a column value in a trigger?

  • quote:


    Have you looked at instead of triggers?


    It's possible that tkbr0wn meant to say, 'Have you looked at an Identity column instead of using triggers?' If this is so, you can use this column type to automagically get the next available integer value.

    If that won't work for you, you could use a SELECT Max(KeyColumn) and add 1 to it to get the next available value. This, of course, requires a lock on the table to consistently return a unique value... if the column value must be unique.

    SJTerrill