Skip to main content

SET_TABLE_PREFS

The SET_TABLE_PREFS procedure is used to set the statistics preferences for a table owned by a specified user.

Syntax

DBMS_STATS.SET_TABLE_PREFS (
ownname IN VARCHAR2,
tabname IN VARCHAR2,
pname IN VARCHAR2,
pvalue IN VARCHAR2);

Parameters

ParameterDescription
ownnameThe username. If the username is set to NULL, the current login username will be used by default.
tabnameThe table name.
pnameThe name of the preference.
pvalueThe value of the preference.

Exceptions

Error CodeDescription
HY000
  • The object does not exist or the user does not have sufficient privileges.
  • Invalid value or illegal input value.

Usage

  • You must connect 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 quotes.

Examples

Set the default value of the DEGREE preference for the collection strategy of the tbl1 table owned by the testUser01 user to 128.

CALL DBMS_STATS.SET_TABLE_PREFS('testUser01', 'tbl1', 'DEGREE', '128');
Query OK, 0 rows affected