GET_PREFS
The GET_PREFS function is used to retrieve 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 preference. |
| ownname | The username. If ownname is set to NULL, the current login username is used by default. |
| tabname | The table name. |
Exceptions
| Error Code | Description |
|---|---|
| HY000 |
|
Examples
Retrieve the default value of the GRANULARITY parameter for user testUser01 in the tbl1 table.
SELECT DBMS_STATS.GET_PREFS ('GRANULARITY','testUser01','tbl1') FROM DUAL;
+----------------------------------------------------------+
| DBMS_STATS.GET_PREFS ('GRANULARITY','testUser01','tbl1') |
+----------------------------------------------------------+
| AUTO |
+----------------------------------------------------------+
1 row in set