How should I limit a table to N rows, discarding oldest?
You can create a view to hide the rest of the rows when they do exist:

CREATE VIEW dbo.Top1000Rows
AS
  SELECT TOP (1000) ...columns...
    FROM dbo.table_name
    ORDER BY DateCreatedUTC DESC;
GO


Then periodically run this in a background job (just play with the frequency until you're happy with how often the table itself is "off", and by how much):

;WITH x AS 
(
  SELECT pk_column, 
    rn = ROW_NUMBER() OVER (ORDER BY DateCreatedUTC DESC)
  FROM dbo.table_name
)
DELETE x WHERE rn &gt; 1000;


If it doesn't have to be exactly 1,000 rows all of the time, then you can potentially forget about the view altogether, knowing that sometimes there will be more than 1,000 rows.