PLEASE HELP! how to delete columns ...

PLEASE HELP! how to delete columns ...

Post by Rachakonda Sat » Tue, 02 May 1995 04:00:00



Hi,

I am a new bee in this field.  I created a database schema on Oracle
Work Group Server.  I am building the client application using Power
Builder.  There is absolutely no data in the database.

Now, I want to delete a few columns from the data definition itself.
I see that either ALTER TABLE or DROP would not work.  Can somebody
please help me with this?

I appreciate any help in advance.  It will be more convenient if I can
get a mail to my e-mail account directly.

Thanks a bunch,

Mahesh
--
Rachakonda Satya Mahesh                               res: (913) 749-7540
University of Kansas, Lawrence                        off: (913) 864-7374

 
 
 

PLEASE HELP! how to delete columns ...

Post by ENVIPCO Management Servic » Tue, 02 May 1995 04:00:00


: Hi,

: I am a new bee in this field.  I created a database schema on Oracle
: Work Group Server.  I am building the client application using Power
: Builder.  There is absolutely no data in the database.

: Now, I want to delete a few columns from the data definition itself.
: I see that either ALTER TABLE or DROP would not work.  Can somebody
: please help me with this?

: I appreciate any help in advance.  It will be more convenient if I can
: get a mail to my e-mail account directly: --

Hopefully you have created your tables by using scripts...

If so, then edit the scripts to first DROP the tables to be changed then
recreate them.

 --

_/_/_/_/  _/     _/  _/      _/  _/_/_/  _/_/_/_/   _/_/_/    _/_/_/
_/        _/_/   _/   _/     _/    _/    _/    _/  _/    _/  _/    _/
_/_/_/    _/ _/  _/    _/   _/     _/    _/_/_/    _/        _/    _/
_/        _/  _/ _/     _/ _/      _/    _/        _/        _/    _/
_/_/_/_/  _/   _/_/      /_/     _/_/_/  _/         _/_/_/   _/_/_/
=====================================================================

 or Ron Frederick     -  ergo ?      (8P
---------------------------------------------------------------------
#include <StandardDisclaimerOnOpinions>  // Null if file not found.
=====================================================================

 
 
 

PLEASE HELP! how to delete columns ...

Post by Steve Cosn » Wed, 03 May 1995 04:00:00



...text deleted

>Now, I want to delete a few columns from the data definition itself.
>I see that either ALTER TABLE or DROP would not work.  Can somebody
>please help me with this?

>...text deleted
>University of Kansas, Lawrence                        off: (913) 864-7374


Whenever you create a table, store the SQL so you can reuse it.

We ALWAYS store the SQL used to create a table.  In the development of
a new system, it is a regular occurrence that columns are added or
dropped, keys and constraints are changed, storage parameters are
changed, etc.

It is a simple matter, to edit the SQL to create the table, and then
run a batch (background) job to drop and re-create the table.

The same job can be run by several developers of the system, so they
each have a current version of the table to use in thier testing
environment.

Hope this helps.

 
 
 

PLEASE HELP! how to delete columns ...

Post by James Richar » Fri, 05 May 1995 04:00:00




>...text deleted

>>Now, I want to delete a few columns from the data definition itself.
>>I see that either ALTER TABLE or DROP would not work.  Can somebody
>>please help me with this?

>>...text deleted
>>University of Kansas, Lawrence                        off: (913) 864-7374

>Whenever you create a table, store the SQL so you can reuse it.

>We ALWAYS store the SQL used to create a table.  In the development of
>a new system, it is a regular occurrence that columns are added or
>dropped, keys and constraints are changed, storage parameters are
>changed, etc.

>It is a simple matter, to edit the SQL to create the table, and then
>run a batch (background) job to drop and re-create the table.

>The same job can be run by several developers of the system, so they
>each have a current version of the table to use in thier testing
>environment.

>Hope this helps.

I agree with this but...
If you're working with live data, add to your *.SQL script to;
rename current to old, create new, recreate indexes, regrant privilages,
INSERT INTO new SELECT matching_columns FROM old;

DON'T DROP THE OLD TABLE for 6 months to 1 year.
You may need the (now) discarded data
once the users changes their minds again.

As an alternative...
create a table with the unique key column and the deleted column(s).
Then you can drop the old table, with duplicated (now) data.

 
 
 

1. How to create user-defined column types?, not objects.Help, please

I want to create user defined types like

TYPE dom_address AS char(45)

so then I write

CREATE TABLE emp (
id_emp INTEGER,
addr_emp dom_addres);

Note that this does not involves using Object types at all.
I think it is very useful for using "alias" for column types that are
more explicit and readable, and reutilisable as data type in other
columns with the same nature.

Can that be done in Oracle8i?
If the answer is yes, which is the syntax of the statement to do that?
Thanks in advance,
Buz.

2. Hosts table on 3600 router?

3. Renaming or Deleting a Column

4. Borland Email Address?

5. Deleting columns in a table

6. I need your help

7. Deleting columns

8. initialization of array of structures

9. Deleting Columns in Oracle tables

10. How to delete a column?

11. SQL-question: delete a column out of a table

12. Please please help me

13. Please Please I need HELP!!!!!