The CREATE_STAT_TABLE procedure creates a table in the specified schema to store statistics.
Syntax
DBMS_STATS.CREATE_STAT_TABLE(
ownname VARCHAR2,
stattab VARCHAR2,
tblspace VARCHAR2 DEFAULT NULL,
global_temporary BOOLEAN DEFAULT FALSE);
Parameters
| Parameter | Description |
|---|---|
| ownname | The username. If NULL, the current login username is used. |
| stattab | The name of the statistics user table to be created. |
| tblspace | The name of the tablespace where the new statistics user table is located. If not specified, the default tablespace of the user is used. |
| global_temporary | Description This parameter is not supported in the current version. |
Exceptions
| Error Code | Description |
|---|---|
| HY000 |
|
Considerations
You need the necessary privileges to create a table in the specified schema.
Examples
Create a statistics user table named test_stat for the user testUser01.
obclient> CALL DBMS_STATS.CREATE_STAT_TABLE('testUser01', 'test_stat');
Query OK, 0 rows affected
