Progress
Embedded SQL-92
Guide and Reference


DROP TABLE

The DROP TABLE statement deletes all data and indexes for a table and erases its entry in the system catalog.

EXAMPLE

The following code fragment shows a DROP TABLE statement to drop the tmp_customer table:

/*  
** CONNECT TO the DEFAULT database 
*/ 
EXEC SQL 
     CONNECT TO DEFAULT ; 
/* 
** Drop the tmp_customer table from the database. 
*/ 
EXEC SQL 
     DROP TABLE tmp_customer ; 
if (sqlca.sqlcode < 0) 
{ 
     printf ("DROP TABLE statement failed (%ld : %s) \n", 
          sqlca.sqlcode, sqlca.sqlerrm) ; 
     EXEC SQL ROLLBACK WORK ; 
     EXEC SQL DISCONNECT DEFAULT ; 
     exit (1) ;  
} 
/*  
** Successful DROP; COMMIT the DROP operation. 
*/ 
EXEC SQL 
     COMMIT WORK ;  
printf ("Dropped tmp_customer table. \n"); 
/*  
** DISCONNECT from the DEFAULT database 
*/ 
EXEC SQL 
     DISCONNECT DEFAULT ; 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095