CREATE_STAT_TABLE
The CREATE_STAT_TABLE procedure is used to create 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 the username is set to NULL, the current login username will be used by default. |
| stattab | The name of the statistics user table to be created. |
| tblspace | The name of the tablespace where the newly created statistics user table is located. If this parameter is not specified, the default tablespace of the user will be used. |
| global_temporary | Description This parameter is not supported in the current version. |
Exceptions
| Error Code | Description |
|---|---|
| HY000 |
|
Usage
You need to have the necessary privileges to create a table in the specified schema.
Examples
Create a statistics user table named test_stat for the user testUser01.
CALL DBMS_STATS.CREATE_STAT_TABLE('testUser01', 'test_stat');
Query OK, 0 rows affected