DISC

Contents | What's New | Quick Links

 

SQL Commands

Introduction

Software Installation

Concepts and Design

Designing Applications

Omnidex Environments

SQL Reference

Omnidex API's

Utilities

Interfaces

Performance Guide

Troubleshooting Guide

Appendix

 

 

DROP TABLE

 

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

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

ODXSQL Example

CREATE TABLE

SQL Reference

Commands

Functions

 

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.

top

 

OdxSQL 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

Dynamic Information Systems Corporation - Omnidex Version 3.8 Build 6 J15.03-Copyright © 2003

DISC | Documentation Home