Introduction to SQL - Technical MCQs

Q1:

The command to eliminate a table from a database is:

A REMOVE TABLE CUSTOMER;

B DROP TABLE CUSTOMER;

C DELETE TABLE CUSTOMER;

D UPDATE TABLE CUSTOMER;

ANS:B - DROP TABLE CUSTOMER;

If you want to remove a table from the database then we use drop command.

Drop is a DDL command.

The syntax is:
Drop table <tablename>;

From oracle 10g onwards if u remove a table ,we can get back by using Flashback command:

The syntax is:

Flashback table <tablename> before drop;

If you want to remove a table perminently then we use purge command.

Drop table <tablename> purge;