Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Syntax?

Re: SQL Syntax?

From: Volker Neurath <neanderix_at_gmx.de>
Date: Sun, 18 Nov 2001 18:52:57 +0100
Message-ID: <9t8s9c$10vg4$10@ID-29596.news.dfncis.de>


Hello Robert,

may be interesting for you to have a look into Oracle's documentation ;-)

>Once I have a table created, sales, and I now wish to add another field,
>column, what would be the syntax?

ALTER TABLE tablename ADD fieldname fieldtype;

>Question II:
>
>What is the syntax to delete a whole table?

That depends on if you want to get rid off the whole table or only of the table's content.

To get rid of the table's contend:

DELETE FROM tablename; commit;

or

TRUNCATE TABLE tablename;

The difference is, that, in case of using TRUCATE, you won't be able to get back your records by calling a "rollback".

To get rid off the whole table:

DROP TABLE tablename;

Volker Received on Sun Nov 18 2001 - 11:52:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US