2.3.28 CREATE QUEUE TABLE

Table of Contents Previous Next


2 The SQL Language : 2.3 SQL Commands : 2.3.28 CREATE QUEUE TABLE

Advanced Server includes extra syntax (not offered by Oracle) with the CREATE QUEUE TABLE SQL command. This syntax can be used in association with DBMS_AQADM.
CREATE QUEUE TABLE-- create a new queue table.
Use CREATE QUEUE TABLE to define a new queue table:
CREATE QUEUE TABLE name OF type_name [ ( { option_name option_value } [, ... ] ) ]
where option_name and the corresponding option_value can be:
TABLESPACE tablespace_name, PCTFREE integer, PCTUSED integer, INITRANS integer, MAXTRANS integer, STORAGE storage_option
Where storage_option is one or more of the following:
MINEXTENTS integer, MAXEXTENTS integer, PCTINCREASE integer, INITIAL size_clause, NEXT, FREELISTS integer, OPTIMAL size_clause, BUFFER_POOL {KEEP|RECYCLE|DEFAULT}.

Please note that only the TABLESPACE option is enforced; all others are accepted for compatibility and ignored. Use the TABLESPACE clause to specify the name of a tablespace in which the table will be created.
CREATE QUEUE TABLE allows a superuser or a user with the aq_administrator_role privilege to create a new queue table.
If the call to CREATE QUEUE TABLE includes a schema name, the queue table is created in the specified schema. If no schema name is provided, the new queue table is created in the current schema.
The name of any options that will be associated with the new queue table, and the corresponding value for the option. If the call to CREATE QUEUE TABLE includes duplicate option names, the server will return an error. The following values are accepted:
Use the SORT_LIST option to control the dequeueing order of the queue; specify the names of the column(s) that will be used to sort the queue (in ascending order). The currently accepted values are the following combinations of enq_time and priority:
enq_time. priority
priority. enq_time
enq_time
A BOOLEAN value that indicates if a message can have more than one consumer (TRUE), or are limited to one consumer per message (FALSE).
MESSAGE_GROUPING
Specify none to indicate that each message should be dequeued individually, or transactional to indicate that messages that are added to the queue as a result of one transaction should be dequeued as a group.
Use STORAGE_CLAUSE to specify table attributes. STORAGE_CLAUSE may be TABLESPACE tablespace_name, PCTFREE integer, PCTUSED integer, INITRANS integer, MAXTRANS integer, STORAGE storage_option
Where storage_option is one or more of the following:
MINEXTENTS integer, MAXEXTENTS integer, PCTINCREASE integer, INITIAL size_clause, NEXT, FREELISTS integer, OPTIMAL size_clause, BUFFER_POOL {KEEP|RECYCLE|DEFAULT}.

Please note that only the TABLESPACE option is enforced; all others are accepted for compatibility and ignored. Use the TABLESPACE clause to specify the name of a tablespace in which the table will be created.
The following command uses the work_order type to create a queue table named work_order_table:

2 The SQL Language : 2.3 SQL Commands : 2.3.28 CREATE QUEUE TABLE

Table of Contents Previous Next