I have a small table with few rows
create table dbo.p(i int); insert dbo.p(i) values (1), (2), (3), (4), (4);
I created statistics; no index, just the stats.
create statistics p_c on dbo.p(i) with fullscan;
I'm investigating various things so i tried to set the ROWCOUNT to the upper limit of a bigint.
update statistics dbo.p p_c with rowcount = 9223372036854775807;
This fails with error message
Msg 3739, Level 11, State 3, Line 346
Cannot UPDATE the index 'p_c' because it is not a statistics collection.
It also fails with
ROWCOUNT = 1; although
update statistics dbo.p p_c succeeds.
This error is not in the documentation. I can find nothing online that seems relevant.
What is a statistics collection as opposed to plain-old table statistics? Why might setting ROWCOUNT be failing here?
SQL Server 2017 (RTM-CU31-GDR) (KB5021126)