How to drop (delete) a database table with Mini SQL (mSQL)
by Developer's Daily
 

Dropping a database table with Mini SQL (mSQL) is very simple. All you have to do is use the msql command.

Let's assume that you want to drop a database table named Customer in the database named contact_mgr.  At the Unix command line, type:

msql contact_mgr


(Warning:  The following command deletes a database table and the entire contents of the database table!)

In the msql utility, drop the table in mSQL with the usual SQL syntax.  Then type \g (mSQL's go command), and then type \q when you're ready to quit.  The sequence of commands in the msql utility looks like this:

drop table Customer

\g

\q


At this point you'll be returned to the Unix command line.

This command drops (deletes) the database table named Customer in the database named contact_mgr.
 
 

Other locations on the Developer's Daily web site

We invite you to visit other free educational resources on our web site: