The GET_PREFS function is used to obtain the default value of a specified preference.
Syntax
DBMS_STATS.GET_PREFS (
pname IN VARCHAR2,
ownname IN VARCHAR2 DEFAULT NULL,
tabname IN VARCHAR2 DEFAULT NULL)
RETURN VARCHAR2;
Parameters
Parameter |
Description |
|---|---|
| pname | The name of the Prefs. |
| ownname | Username. If the username is set to NULL, the current login username will be used by default. |
| tabname | Table name. |
Exceptions
Error Code |
Description |
|---|---|
| HY000 |
|
Examples
Retrieves the default value of the GRANULARITY parameter for the user testUser01 in the tbl1 table.
obclient> SELECT DBMS_STATS.GET_PREFS ('GRANULARITY','testUser01','tbl1') FROM DUAL;
+----------------------------------------------------------+
| DBMS_STATS.GET_PREFS ('GRANULARITY','testUser01','tbl1') |
+----------------------------------------------------------+
| AUTO |
+----------------------------------------------------------+
1 row in set