ALTER STATISTICS
ALTER STATISTICS
7
SQL - Language Statements
ALTER STATISTICS
change the definition of a extended statistics
ALTER STATISTICS name OWNER TO { new_owner | CURRENT_USER | SESSION_USER }
ALTER STATISTICS name RENAME TO new_name
ALTER STATISTICS name SET SCHEMA new_schema
Description
ALTER STATISTICS changes the parameters of an existing
extended statistics. Any parameters not specifically set in the
ALTER STATISTICS command retain their prior settings.
You must own the statistics to use ALTER STATISTICS>.
To change a statistics' schema, you must also have CREATE>
privilege on the new schema.
To alter the owner, you must also be a direct or indirect member of the new
owning role, and that role must have CREATE privilege on
the statistics' schema. (These restrictions enforce that altering the owner
doesn't do anything you couldn't do by dropping and recreating the statistics.
However, a superuser can alter ownership of any statistics anyway.)
Parameters
name
The name (optionally schema-qualified) of the statistics to be altered.
new_owner
The user name of the new owner of the statistics.
new_name
The new name for the statistics.
new_schema
The new schema for the statistics.
Compatibility
There's no ALTER STATISTICS command in the SQL standard.
See Also