Re: UPDATE on a column with a set default




Unless you are controlling all avenues of database access, default
values do NOT ensure that a value is reset on insert or update.
Default only applies if no value is provided.

If you're looking to provide the date a row was inserted or updated,
then a trigger is a valid choice. And they work fine for this.

Mark

On Mon, 30 Jan 2006 12:47:03 -0700, Mike Husler
<Michael.P.Husler@xxxxxxxx> wrote:

>If we have a column with a default value set, say GETDATE( ), how can we
>assure that value is reset on an UPDATE (not an INSERT) without changing
>the client code that does the updating?
>I'd rather stay away from triggers, etc if possible.
>
>Thanks,
>Mike Husler
.



Relevant Pages

  • Re: need time delay 555 / 556 circuit help
    ... but will allow the first timer to trigger on as ... soon as the reset voltage to> 1.2V. ... > Adding the following circuit to the second timer should prevent it ...
    (sci.electronics.basics)
  • Re: AFTER INSERT?
    ... If you have an identity column you can really reset the value from within a ... is there a After Insert trigger functionality in SQL Server 2000? ... > and reset it if it has passed a certain limit. ... > It appears that I cannot do this WHILE I am inserting, ...
    (microsoft.public.sqlserver.programming)
  • Re: "AK 47 Trigger Opinion"
    ... they designed their trigger to not reset on a partial pull. ... Although they claim it's not a safety issue, ...
    (rec.guns)
  • Re: STSadm Restore, not resetting Site confirmation/deletion settings
    ... How does one reset the trigger dateor otherwise prevent ... There's no need of an alert fix if you solve the problem through "social ... users might start confirming. ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Driving 555 IC with a pulse stream
    ... When the driving signal pulls RESET and TRIGGER both low at the same ... starting the charging of the timing cap. ...
    (sci.electronics.basics)