man > ALTER_STATISTICS(7)

๐Ÿท๏ธ NAME

ALTER_STATISTICS - change the definition of an extended statistics object

๐Ÿš€ Quick Reference

Use CaseCommandDescription
Change OwnerALTER STATISTICS name OWNER TO new_owner;Transfer ownership of the statistics object
Rename ObjectALTER STATISTICS name RENAME TO new_name;Rename the statistics object
Move to SchemaALTER STATISTICS name SET SCHEMA new_schema;Move the object to a different schema
Set Statistics TargetALTER STATISTICS name SET STATISTICS new_target;Adjust the statisticsโ€‘gathering granularity for ANALYZE

๐Ÿ“– SYNOPSIS

ALTER STATISTICS name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
ALTER STATISTICS name RENAME TO new_name
ALTER STATISTICS name SET SCHEMA new_schema
ALTER STATISTICS name SET STATISTICS new_target

๐Ÿ“ DESCRIPTION

โœ๏ธ ALTER STATISTICS changes the parameters of an existing extended statistics object. Any parameters not specifically set in the ALTER STATISTICS command retain their prior settings.

You must own the statistics object to use ALTER STATISTICS. To change a statistics object's 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 object's schema. (These restrictions enforce that altering the owner doesn't do anything you couldn't do by dropping and recreating the statistics object. However, a superuser can alter ownership of any statistics object anyway.)

๐Ÿ”ง PARAMETERS

๐ŸŒ COMPATIBILITY

There is no ALTER STATISTICS command in the SQL standard.

๐Ÿ”— SEE ALSO

CREATE STATISTICS(7), DROP STATISTICS(7)

ALTER_STATISTICS(7)
๐Ÿท๏ธ NAME ๐Ÿš€ Quick Reference ๐Ÿ“– SYNOPSIS ๐Ÿ“ DESCRIPTION ๐Ÿ”ง PARAMETERS ๐ŸŒ COMPATIBILITY ๐Ÿ”— SEE ALSO

Generated by phpman v4.9.22-1-g1b0fcb4 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-05 06:02 @216.73.216.52
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format