HSQLDB Drop Table - Hyper SQL Database

How to drop an existing HSQLDB table?

An existing HSQLDB table can be dropped in simple steps but need to be very careful, as data will be lost completely and will not be recovered, once the HSQLDB is deleted.

Syntax

The syntax to drop a HSQLDB table is as follows:

Example

For instance, a table named employee is considered to drop from HSQLDB server. The query to drop employee table is:

Once the above query is executed, the output received appears as:

How to use JDBC Program to drop a HSQLDB table?

The JDBC program used to drop the table employee from the HSQLDB server is as follow:

The following code is saved into DropTable.java file.

The database can be started by the following command:

The command used to compile and execute the above program is:

On execution of the above command, the output received is as follows:

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Hyper SQL Database Topics