Just to add to it...
If you want to drop a column and you do not want to lose data from the
table you may follow the following sequence,
select field1,field2... from TableToBeChanged
into TableToBeChanged_OldData;
where field1,field2... will be having all the columns except the one you
want to
"Michal A. Kowalski" wrote:
>
> Hi,
>
> is there any way to change table structure without doing DROP and CREATE
> again?
nope, only if you rename (table|attr) name(s) or add an attribute.
--
CIMPOESU Teodor, Web Programmer
@ DIGICOM S.A. Bucharest, Romania
@ Internet, site development
@ [EM
AFAIK, you can add and and rename columns no problem:
functions=> \h alter table
Command: alter table
Description: add/rename attributes, rename tables
Syntax:
ALTER TABLE class_name [*] ADD COLUMN attr type
ALTER TABLE class_name [*] RENAME [COLUMN] attr1 TO attr2
ALTER T