title: UPDATE status on last record
body: <p>I have a table with these fields: 
  ID,
  ContractID,
  ClientID,
  Date,
  DueDate,
  Status</p>
  
  <p>Each client can only have 1 active contract at a time, I want to update the last record of the table to set itself to "inactive" when a new record is added, the new record must set itself to "active". </p>
  
  <p>I had a stored procedure that did something like this, but i'm not sure if it'll work. </p>
  
  <pre><code>IF EXISTS ( SELECT * FROM Contracts WHERE ClientID='f0004' AND contractID='1')
  BEGIN
      INSERT INTO Contracts(Status) VALUES ('Active')
  END
  </code></pre>