Skip to main content
Version: V1.2.0

DELETE_SCHEMA_PREFS

The DELETE_SCHEMA_PREFS procedure is used to delete the statistics preference of all tables in the specified schema.

Syntax​

DBMS_STATS.DELETE_SCHEMA_PREFS (
ownname IN VARCHAR2,
pname IN VARCHAR2);

Parameters​

ParameterDescription
ownnameThe name of the schema.
pnameThe name of the preference.

Exceptions​

Error CodeDescription
HY000The schema does not exist or the user does not have the required privileges, or the input value is invalid or illegal.

Usage​

  • You must connect to the database as the specified user to run this procedure.

  • All parameters in this procedure are of the VARCHAR2 type, and their values must be enclosed in quotation marks.

Examples​

Delete the DEGREE preference in the hr schema.

CALL DBMS_STATS.DELETE_SCHEMA_PREFS('hr', 'DEGREE');
Query OK, 0 rows affected