datachange function

Automatic update statistics is based on the datachange function, which returns the percentage of data modified within a table. You can include this function in existing update statistics scripts to take advantage of its tracking abilities. For example:

select @datachange = datachange("authors", null, null)
if @datachange > 50		
begin
	update statistics authors
end

Consider the following when you use the datachange function: