Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

SQL Reference

Commands

Syntax

Options

Example

 

SQL Reference

Joins

Nested Queries

Set Operations

ON CURSOR | INSTANCE

WITH Options

Commands

Functions

 

DROP TABLE

A DROP TABLE command is used to remove a table created with a CREATE TABLE or SELECT INTO command from both the database and the environment access cache. Tables can only be dropped during the same Omnidex process in which they were created. Omnidex is unaware of the existence of tables created in separate processes unless they are defined in the Omnidex Environment Catalog.

To remove a table created with a CREATE TABLE or SELECT INTO command in a different process, use the appropriate RDBMS tool.

 

Syntax

DROP TABLE table [ON [INSTANCE] instance] [WITH options]

DROP TABLE
Required

table
Required. The name of the table to be dropped.

[ON [INSTANCE] instance]
Optional - Specify which instance to drop the table from. Default is the current instance. The "INSTANCE" keyword is optional.

 

Options

 

 

Example

This example creates an empty table named CUSTS using a CREATE TABLE command, inserts some rows into the table, runs a select statement against that table and then drops the table.

>CREATE TABLE CUSTS (CUSTOMER CHAR LENGTH 40)
Table CUSTS created
>

Insert a row using the INSERT INTO command.

>INSERT INTO CUSTS VALUES ('JANE SMITH')
1 row inserted into CUSTS
>

>INSERT INTO CUSTS VALUES ('JOHN SIMPSON')
1 row inserted into CUSTS
>

Select rows from the new table using the SELECT command.

>SELECT * FROM CUSTS

CUSTOMER
----------------------------------------
JANE SMITH
JOHN SIMPSON

Note that because the new table is not indexed, selects are preformed by serial read.

Drop the table using the DROP TABLE command.

>DROP TABLE CUSTS
Table CUSTS dropped


>

Top